您好我在Eclipse中遇到麻煩,包括OpenCV庫。我遵循很多教程,但我不能編譯任何東西。這是控制檯的輸出。Eclipse + OpenCV + Cygwin - > cv.h:沒有這樣的文件或目錄
Building file: ../hand.c
Invoking: Cygwin C Compiler
gcc -O2 -g -Wall -c -fmessage-length=0 -MMD -MP -MF"hand.d" -MT"hand.d" -o"hand.o" "../hand.c"
cygwin warning:
MS-DOS style path detected: D:\Eclipse_workspace_C++\HelloWorld\Default
Preferred POSIX equivalent is: /cygdrive/d/Eclipse_workspace_C++/HelloWorld/Default
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
../hand.c:3:16: fatal error: cv.h: No such file or directory
compilation terminated.
subdir.mk:18: recipe for target `hand.o' failed
make: *** [hand.o] Error 1
我正在使用OpenCV2.0。
我在proyect屬性中配置了C/C++構建 - >設置 - >工具設置選項卡 - >編譯器和鏈接器來添加opencv庫和標題,但我無法編譯它。
我的eclipse項目的ScreenShoot。
做以下檢查1)你有包括 「../include/opecv」 和」 ../include/opencv2" 路徑? 2)檢查opencv和cygwin的環境變量是否設置正確。 – 2vision2 2013-05-13 07:00:19
嗨,環境變量設置。關於包含opencv2?我在opencv 2.0目錄中沒有這個文件夾。 – Patrick 2013-05-13 07:02:51
你不能使用opencv4 +版本嗎?爲什麼堅持2.0? – 2vision2 2013-05-13 08:10:15