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"
int add(int a, int b)
{
int c = a + b;
return c;
int c = a + b;
return c;
}

View File

@ -1,8 +1,10 @@
#include <iostream>
#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;
}

View File

@ -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: