added opencv

This commit is contained in:
Aurelien LOHMANN 2022-03-30 09:20:43 +02:00
parent 9636823fb9
commit 76532efb1f
3 changed files with 9 additions and 7 deletions

View File

@ -2,6 +2,6 @@
#include "arithmetic.h" #include "arithmetic.h"
int add(int a, int b) int add(int a, int b)
{ {
int c = a + b; int c = a + b;
return c; return c;
} }

View File

@ -1,8 +1,10 @@
#include <iostream> #include <iostream>
#include "arithmetic.h" #include "arithmetic.h"
#include "opencv2/opencv.hpp"
int main() int main()
{ {
std::cout << "Hello world!" << std::endl; std::cout << "Hello world!" << std::endl;
std::cout << "c= " << add(1,2) << std::endl; std::cout << "c= " << add(1,2) << std::endl;
return 0; return 0;
} }

View File

@ -1,7 +1,7 @@
all: main arithmetic 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 main: main.cpp
g++ -c main.cpp g++ -c main.cpp -I/usr/include/opencv4
arithmetic: arithmetic.cpp arithmetic.h arithmetic: arithmetic.cpp arithmetic.h
g++ -c arithmetic.cpp g++ -c arithmetic.cpp
clean: clean: