I'm trying to compile a C++ file on a Mac that uses opencv2.
I downloaded opencv, found an opencv2 folder in it, and copied it into the folder where main.cpp (the program I'm trying to run is).
The folder structure is:
main.cpp
BRIEF.h
- opencv2
core.hpp
- core
cvdef.h
My current command (after reading this and this) is g++ -I/opencv2/core.hpp main.cpp
, run from within the same folder main.cpp
is in.
main.cpp
has #include "BRIEF.h"
which works fine.
BRIEF.h
has #include "opencv2/core.hpp"
which works fine.
core.hpp
has #include "opencv2/core/cvdef.h"
which fails saying the file was not found.
How do I use G++ such that the file can be found?