added opencv
This commit is contained in:
parent
9636823fb9
commit
76532efb1f
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
8
main.cpp
8
main.cpp
|
|
@ -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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
4
makefile
4
makefile
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue