compiler errors - when use cygwin g++ to build a project , can't find the include head file even if I have indicated path with -I -
i knew there punch of kind problem bother . it's weird me . please patient let me finish problem statement .
background : windows vista , cygwin latest version , opencv 2.4.3
my project make file opencv installed in d:\application\opencv2.4.3\opencv :
opencv=/cygdrive/d/application/opencv2.4.3/opencv/build custom_includes+=-i${opencv}/include -i${opencv}/include/opencv -i${opencv}/include/opencv2/ml -i${opencv}/include/opencv2/highgui -i${src_dir} custom_libraries+= -l${opencv}/x86/mingw/lib -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_objdetect
and head file need build :
#include <iostream> #include <string> #include <opencv2/core/core.hpp> #include <opencv2/core/core_c.h> blablabla...
when execute :
g++ -c src/objectdetector.cpp -wall -o3 -ffast-math -funroll-loops -i/cygdrive/d/application/opencv2.4.3/opencv/build/include -i/cygdrive/d/application/opencv2.4.3/opencv/build/include/opencv -i/cygdrive/d/application/opencv2.4.3/opencv/build/include/opencv2/ml -i/cygdrive/d/application/opencv2.4.3/opencv/build/include/opencv2/highgui -isrc/ -o build/objectdetector.o
oops, turn out :
in file included src/objectdetector.cpp:10:0: src/objectdetector.h:15:33: fatal error: opencv2/core/core.hpp: no such file or directory
i 100 persent sure opencv2/core/core.hpp in /cygdrive/d/application/opencv2.4.3/opencv/build/include , , use "" substitute <> . none of these works , pained . have referenced every google search item . pls me out .
thanks .
it looks trying mix mingw-compiled opencv cygwin; won't work. if want use opencv on cygwin, try installing libopencv-devel
package cygwin ports.
Comments
Post a Comment