diff --git a/arithmetic.cpp b/arithmetic.cpp index d6bcd30..e453712 100644 --- a/arithmetic.cpp +++ b/arithmetic.cpp @@ -2,6 +2,6 @@ #include "arithmetic.h" int add(int a, int b) { -int c = a + b; -return c; + int c = a + b; + return c; } diff --git a/main.cpp b/main.cpp index af6710b..74601a4 100644 --- a/main.cpp +++ b/main.cpp @@ -1,8 +1,10 @@ #include #include "arithmetic.h" +#include "opencv2/opencv.hpp" int main() { -std::cout << "Hello world!" << std::endl; -std::cout << "c= " << add(1,2) << std::endl; -return 0; + std::cout << "Hello world!" << std::endl; + std::cout << "c= " << add(1,2) << std::endl; + return 0; + } diff --git a/makefile b/makefile index 052cd56..9a8464a 100644 --- a/makefile +++ b/makefile @@ -1,7 +1,7 @@ all: main arithmetic - g++ arithmetic.o main.o + g++ arithmetic.o main.o -L/usr/lib/x86_64-linux-gnu -lopencv_core main: main.cpp - g++ -c main.cpp + g++ -c main.cpp -I/usr/include/opencv4 arithmetic: arithmetic.cpp arithmetic.h g++ -c arithmetic.cpp clean: