Eclipse/C++ cannot find header files -
i've added macos x c++ linker , gcc c++ compiler includes , libraries libraries , paths, i'm still unable #include library path , file i've added.
code:
#include <opencv2/text/ocr.hpp>
error:
fatal error: 'opencv2/text/ocr.hpp' file not found
eclipse setup: (project > properties > c/c++ build > settings)
macos x c++ linker > libraries
library search paths:
/usr/local/cellar/opencv3/3.1.0_4/lib
/usr/local/cellar/opencv3/3.1.0_4/include/opencv2
/usr/local/cellar/opencv3/3.1.0_4/include/opencv2/text
libraries:
ocr
gcc c++ compiler > includes
include paths:
/usr/local/cellar/opencv3
mac file structure:
ocr.hpp exists in /usr/local/cellar/opencv3/3.1.0_4/include/opencv2/text
my thoughts:
- it seems eclipse still looking in
~/cellar/opencvinstead of~/cellar/opencv3. - because can
#includelibraries in/usr/local/cellar/opencv/2.4.13.1/include/opencv2without adding paths eclipse project settings. - but cannot
#includelibraries/usr/local/cellar/opencv3/3.1.0_4/include/opencv2
i'm used working in ruby library management super easy, it's frying brain little trying things setup in c++. appreciated.
solution:
projects > properties > c/c++ general > paths , symbols > gnu c++
changed /usr/local/cellar/opencv /usr/local/cellar/opencv3
... > library paths
removed paths , added /usr/local/cellar/opencv3.
then included:
#include <3.1.0_4/include/opencv2/text/ocr.hpp>
thanks assistance in comments.
this post helpful:
eclipse c/c++ (cdt) import files project - header file not found - include path
Comments
Post a Comment