leadrien / opencv_native_androidstudio

An android studio project with native Opencv
320 stars 120 forks source link

Cannot find 'opencv2' #4

Closed p-n0 closed 7 years ago

p-n0 commented 7 years ago

Hi, thank you for your work. I have followed all your steps to create a project from scratch. It all works fine, but in native-lib.cpp I have this problem Error:(3, 10) fatal error: 'opencv2/core.hpp' file not found I said that all works fine because I tried to change

include <opencv2/core.hpp>

in

include <[my custom path]/opencv2/core.hpp>

where my custom path is a folder that contain the opencv directories that usually are in /local/include and it works.

Obv this is not a solution, because I have to modify also all the opencv library header. I tried to copy opencv2 and opencv in the same folder of native-code.cpp, same problem. Can you help me?

p-n0 commented 7 years ago

Solved, just wrong path in CMakeList.txt, include_directories(...)