我将在 Eclipse 中构建我的 Open CV 项目(C++),但它在makefile中出现错误,错误是
recipe for target `Open_CV.exe' failed
我还成功地将lib和opencv包含在项目中,但我不知道为什么会出现此错误,有时我的子目录文件中也会出现错误
和错误日志是:
为项目 Open_CV 构建配置调试 **
生成所有构建文件:../src/Open_CV.c 调用:跨 GCC 编译器 gcc -I"C:\OpenCV2.0\include\opencv" -O0 -g3 -Wall -c -fmessage-length=0 -MMD - MP -MF"src/Open_CV.d" -MT"src/Open_CV.d" -o"src/Open_CV.o" "../src/Open_CV.c" 在 C:/OpenCV2.0/include 包含的文件中/opencv/cv.h:1612, 来自 ../src/Open_CV.c:8: C:/OpenCV2.0/include/opencv/cvcompat.h: 在函数中cvMinAreaRect':
C:/OpenCV2.0/include/opencv/cvcompat.h:425: warning: left-hand operand of comma expression has no effect
C:/OpenCV2.0/include/opencv/cvcompat.h:425: warning: left-hand operand of comma expression has no effect
C:/OpenCV2.0/include/opencv/cvcompat.h:425: warning: left-hand operand of comma expression has no effect
C:/OpenCV2.0/include/opencv/cvcompat.h:425: warning: statement with no effect
../src/Open_CV.c: In function
main':../src/Open_CV.c:20:警告:函数“printf”的隐式声明../src/Open_CV.c:顶层:C:/OpenCV2.0/include/opencv/cxtypes.h :249: 警告: 'cvFloor' 已定义但未使用 C:/OpenCV2.0/include/opencv/cxtypes.h:267: 警告: 'cvCeil' 已定义但未使用 C:/OpenCV2.0/include/opencv/cxtypes .h:287: 警告: 'cvIsNaN' 已定义但未使用 C:/OpenCV2.0/include/opencv/cxtypes.h:302: 警告: 'cvIsInf' 已定义但未使用 C:/OpenCV2.0/include/opencv /cxtypes.h:321: 警告: 'cvRNG' 已定义但未使用 C:/OpenCV2.0/include/opencv/cxtypes.h:337: 警告: 'cvRandReal' 已定义但未使用 C:/OpenCV2.0/include /opencv/cxtypes.h:670:警告:“cvmGet”已定义但未使用 C:/OpenCV2.0/include/opencv/cxtypes.h:705:警告:“cvIplDepth”已定义但未使用 C:/OpenCV2。0/include/opencv/cxtypes.h:880: 警告: 'cvRectToROI' 已定义但未使用 C:/OpenCV2.0/include/opencv/cxtypes.h:893: 警告: 'cvROIToRect' 已定义但未使用 C:/ OpenCV2.0/include/opencv/cxtypes.h:914: 警告: 'cvTermCriteria' 已定义但未使用 C:/OpenCV2.0/include/opencv/cxtypes.h:936: 警告: 'cvPoint' 已定义但未使用 C :/OpenCV2.0/include/opencv/cxtypes.h:966: 警告: 'cvPointTo32f' 已定义但未使用 C:/OpenCV2.0/include/opencv/cxtypes.h:991: 警告: 'cvPoint3D32f' 已定义但未使用使用 C:/OpenCV2.0/include/opencv/cxtypes.h:1011: 警告: 'cvPoint2D64f' 已定义但未使用 C:/OpenCV2.0/include/opencv/cxtypes.h:1031: 警告: 'cvPoint3D64f' 已定义但未使用 C:/OpenCV2.0/include/opencv/cxtypes.h:1052:警告:“cvSize”已定义但未使用 C:/OpenCV2。0/include/opencv/cxtypes.h:1070: 警告: 'cvSize2D32f' 已定义但未使用 C:/OpenCV2.0/include/opencv/cxtypes.h:1146: 警告: 'cvRealScalar' 已定义但未使用 C:/ OpenCV2.0/include/opencv/cxtypes.h:1154: 警告: 'cvScalarAll' 已定义但未使用 C:/OpenCV2.0/include/opencv/cxtypes.h:1666: 警告: 'cvAttrList' 已定义但未使用 C :/OpenCV2.0/include/opencv/cxcore.h:153: 警告: 'cvDecRefData' 已定义但未使用 C:/OpenCV2.0/include/opencv/cxcore.h:174: 警告: 'cvIncRefData' 已定义但未使用使用 C:/OpenCV2.0/include/opencv/cxcore.h:208: 警告: 'cvGetRow' 已定义但未使用 C:/OpenCV2.0/include/opencv/cxcore.h:219: 警告: 'cvGetCol' 已定义但未使用 C:/OpenCV2.0/include/opencv/cxcore.h:248: 警告:'cvReleaseMatND' 已定义但未使用 C:/OpenCV2。0/include/opencv/cxcore.h:271: 警告: 'cvGetNextSparseNode' 已定义但未使用 C:/OpenCV2.0/include/opencv/cxcore.h:522: 警告: 'cvSubS' 已定义但未使用 C:/ OpenCV2.0/include/opencv/cxcore.h:1083: 警告: 'cvCloneSeq' 已定义但未使用 C:/OpenCV2.0/include/opencv/cxcore.h:1126: 警告: 'cvSetNew' 已定义但未使用 C :/OpenCV2.0/include/opencv/cxcore.h:1141: 警告: 'cvSetRemoveByPtr' 已定义但未使用 C:/OpenCV2.0/include/opencv/cxcore.h:1156: 警告: 'cvGetSetElem' 已定义但未使用使用 C:/OpenCV2.0/include/opencv/cxcore.h:1323: 警告: 'cvEllipseBox' 已定义但未使用 C:/OpenCV2.0/include/opencv/cxcore.h:1414: 警告: 'cvFont' 已定义但未使用 C:/OpenCV2.0/include/opencv/cxcore.h:1672: 警告:'cvReadIntByName' 已定义但未使用 C:/OpenCV2。0/include/opencv/cxcore.h:1687: 警告: 'cvReadRealByName' 已定义但未使用 C:/OpenCV2.0/include/opencv/cxcore.h:1701: 警告: 'cvReadStringByName' 已定义但未使用 C:/ OpenCV2.0/include/opencv/cxcore.h:1713:警告:“cvReadByName”已定义但未使用 C:/OpenCV2.0/include/opencv/cxmisc.h:222:警告:“cvAlignPtr”已定义但未使用 C :/OpenCV2.0/include/opencv/cxmisc.h:228: 警告: 'cvAlign' 已定义但未使用 C:/OpenCV2.0/include/opencv/cxmisc.h:234: 警告: 'cvGetMatSize' 已定义但未使用使用 C:/OpenCV2.0/include/opencv/cv.h:635: 警告: 'cvCreateSubdivDelaunay2D' 已定义但未使用 C:/OpenCV2.0/include/opencv/cv.h:670: 警告: 'cvSubdiv2DNextEdge' 已定义但未使用 C:/OpenCV2.0/include/opencv/cv.h:676: 警告:'cvSubdiv2DRotateEdge'已定义但未使用 C:/OpenCV2.0/include/opencv/cv.h:681: 警告: 'cvSubdiv2DSymEdge' 已定义但未使用 C:/OpenCV2.0/include/opencv/cv.h:686: 警告: ' cvSubdiv2DGetEdge' 已定义但未使用 C:/OpenCV2.0/include/opencv/cv.h:694: 警告: 'cvSubdiv2DEdgeOrg' 已定义但未使用 C:/OpenCV2.0/include/opencv/cv.h:701: 警告: 'cvSubdiv2DEdgeDst' 已定义但未使用 C:/OpenCV2.0/include/opencv/cv.h:708: 警告: 'cvTriangleArea' 已定义但未使用 C:/OpenCV2.0/include/opencv/cv.h:892 : 警告: 'cvCalcHist' 已定义但未使用 C:/OpenCV2.0/include/opencv/cv.h:1136: 警告: 'cvSURFPoint' 已定义但未使用 C:/OpenCV2.0/include/opencv/cv.h :1207: 警告: 'cvStarKeypoint' 已定义但未使用 C:/OpenCV2.0/include/opencv/cv.h:1231: 警告: 'cvStarDetectorParams'已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:112: 警告: 'cvMatArray' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:127: 警告: ' cvMean' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:134: 警告: 'cvSumPixels' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:141: 警告: 'cvMean_StdDev' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:154: 警告: 'cvmPerspectiveProject' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:165 : 警告: 'cvFillImage' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:216: 警告: 'cvRandInit' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h :249: 警告: 'cvbRand' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:257: 警告: 'cvbCartToPolar' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:273: 警告: 'cvbFastArctan' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:286: 警告: 'cvbSqrt' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:296: 警告: 'cvbInvSqrt' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:306 : 警告: 'cvbReciprocal' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:316: 警告: 'cvbFastExp' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h :324: 警告: 'cvbFastLog' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:332: 警告: 'cvContourBoundingRect' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat .h:338: 警告: 'cvPseudoInverse' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:385: 警告: 'cvConvexHull' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:413: 警告: 'cvMinAreaRect' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat。 h:434: 警告: 'cvFitLine3D' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:444: 警告: 'cvFitLine2D' 已定义但未使用 C:/OpenCV2.0/include/opencv/ cvcompat.h:453: 警告: 'cvFitEllipse' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:464: 警告: 'cvProject3D' 已定义但未使用 C:/OpenCV2.0/include/ opencv/cvcompat.h:506: 警告: 'cvHoughLines' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:519: 警告: 'cvHoughLinesP' 已定义但未使用 C:/OpenCV2.0/包括/opencv/cvcompat.h:531:警告:“cvHoughLinesSDiv”已定义但未使用 C:/OpenCV2。0/include/opencv/cvcompat.h:543: 警告: 'cvFindFundamentalMatrix' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:577: 警告: 'cvFindChessBoardCornerGuesses' 已定义但未使用 C:/ OpenCV2.0/include/opencv/cvcompat.h:588: 警告: 'cvCalibrateCamera' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:613: 警告: 'cvCalibrateCamera_64d' 已定义但未使用 C :/OpenCV2.0/include/opencv/cvcompat.h:642: 警告: 'cvFindExtrinsicCameraParams' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:667: 警告: 'cvFindExtrinsicCameraParams_64d' 已定义但未使用使用 C:/OpenCV2.0/include/opencv/cvcompat.h:693: 警告: 'cvRodrigues' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:711: 警告: 'cvProjectPoints' 已定义但未使用 C:/OpenCV2。0/include/opencv/cvcompat.h:740: 警告: 'cvProjectPointsSimple' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:771: 警告: 'cvUnDistortInit' 已定义但未使用 C:/ OpenCV2.0/include/opencv/cvcompat.h:786: 警告: 'cvUnDistort' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:804: 警告: 'cvCalcEMD' 已定义但未使用 C :/OpenCV2.0/include/opencv/cvcompat.h:815: 警告: 'cvKMeans' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:829: 警告: 'cvStartScanGraph' 已定义但未使用使用 C:/OpenCV2.0/include/opencv/cvcompat.h:842: 警告: 'cvEndScanGraph' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:862: 警告: 'cvLineAA' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:868: 警告:'cvCircleAA'已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:876: 警告: 'cvEllipseAA' 已定义但未使用 C:/OpenCV2.0/include/opencv/cvcompat.h:883: 警告: ' cvPolyLineAA' 已定义但未使用已完成构建:../src/Open_CV.c
构建目标:Open_CV.exe 调用:Cross GCC Linker gcc -L"C:\OpenCV2.0\lib" -o"Open_CV.exe" ./src/Open_CV.o -lcv200 -lhighgui200 ./src/Open_CV.o:在函数cvDecRefData':
C:/OpenCV2.0/include/opencv/cxcore.h:159: undefined reference to
cvFree ' C:/OpenCV2.0/include/opencv/cxcore.h:167: 未定义对_cvFree_'
./src/Open_CV.o: In function
cvGetRow 的引用': C:/OpenCV2.0/include/opencv/cxcore.h:209: 未定义对_cvGetRows'
./src/Open_CV.o: In function
cvGetCol' 的引用: C:/OpenCV2.0/include/opencv/cxcore.h:220: 未定义对_cvGetCols'
./src/Open_CV.o: In function
cvReleaseMatND' 的引用:C:/OpenCV2.0/include/opencv/cxcore.h:249: 未定义对_cvReleaseMat'
./src/Open_CV.o: In function
cvSubS' 的引用:C:/OpenCV2 .0/include/opencv/cxcore.h:523:未定义对_cvAddS'
./src/Open_CV.o: In function
cvCloneSeq 的引用:C:/OpenCV2.0/include/opencv/cxcore.h:1084:未定义对_cvSeqSlice'
./src/Open_CV.o: In function
cvSetNew 的引用:C:/OpenCV2.0/include /opencv/cxcore.h:1135:未定义的引用_cvSetAdd'
./src/Open_CV.o: In function
cvGetSetElem': C:/OpenCV2.0/include/opencv/cxcore.h:1157: 未定义引用_cvGetSeqElem'
./src/Open_CV.o: In function
cvEllipseBox': C:/OpenCV2.0/include/opencv/cxcore.h:1328: 未定义引用_cvEllipse'
./src/Open_CV.o: In function
cvFont': C :/OpenCV2.0/include/opencv/cxcore.h:1416: 未定义对_cvInitFont'
./src/Open_CV.o: In function
cvReadIntByName' 的引用:C:/OpenCV2.0/include/opencv/cxcore.h:1673: 未定义对_cvGetFileNodeByName'
./src/Open_CV.o: In function
cvReadRealByName' 的引用:C:/OpenCV2。 0/include/opencv/cxcore.h:1688:未定义对_cvGetFileNodeByName'
./src/Open_CV.o: In function
cvReadStringByName 的引用:C:/OpenCV2.0/include/opencv/cxcore.h:1702:未定义对_cvGetFileNodeByName'
./src/Open_CV.o: In function
cvReadByName 的引用:C:/OpenCV2.0/include/ opencv/cxcore.h:1714: 未定义引用_cvGetFileNodeByName'
C:/OpenCV2.0/include/opencv/cxcore.h:1714: undefined reference to
_cvRead' ./src/Open_CV.o: 在函数cvMean':
C:/OpenCV2.0/include/opencv/cvcompat.h:128: undefined reference to
_cvAvg' ./src/Open_CV.o: 在函数cvSumPixels':
C:/OpenCV2.0/include/opencv/cvcompat.h:135: undefined reference to
_cvSum' ./src/Open_CV.o: 在函数中cvMean_StdDev':
C:/OpenCV2.0/include/opencv/cvcompat.h:143: undefined reference to
_cvAvgSdv' ./src/Open_CV.o: 在函数cvmPerspectiveProject':
C:/OpenCV2.0/include/opencv/cvcompat.h:157: undefined reference to
_cvReshape' C:/OpenCV2.0/include/opencv/cvcompat.h:158: 未定义引用_cvReshape'
C:/OpenCV2.0/include/opencv/cvcompat.h:160: undefined reference to
_cvPerspectiveTransform' ./src/Open_CV.o: 在函数cvFillImage':
C:/OpenCV2.0/include/opencv/cvcompat.h:166: undefined reference to
_cvGetElemType' C: /OpenCV2.0/include/opencv/cvcompat.h:166: 未定义对_cvColorToScalar'
C:/OpenCV2.0/include/opencv/cvcompat.h:166: undefined reference to
_cvSet' 的引用。/src/Open_CV.o: 在函数cvRandSetRange':
C:/OpenCV2.0/include/opencv/cvcompat.h:188: undefined reference to
_cvError' C:/OpenCV2.0/include/opencv/cvcompat.h:194: 未定义对_cvError'
./src/Open_CV.o: In function
cvRandInit' 的引用:C:/OpenCV2.0/include/opencv/cvcompat.h:219: 未定义对_cvError'
C:/OpenCV2.0/include/opencv/cvcompat.h:225: undefined reference to
_cvError' 的引用。/src/Open_CV.o: 在函数cvRand':
C:/OpenCV2.0/include/opencv/cvcompat.h:240: undefined reference to
_cvError' C:/OpenCV2.0/include/opencv/ cvcompat.h:243: 未定义的对_cvRandArr'
./src/Open_CV.o: In function
cvbCartToPolar' 的引用:C:/OpenCV2.0/include/opencv/cvcompat.h:267: 未定义的引用_cvCartToPolar'
./src/Open_CV.o: In function
cvbFastArctan': C:/OpenCV2.0/include/opencv/cvcompat.h:281: 未定义对_cvCartToPolar'
./src/Open_CV.o: In function
cvbSqrt 的引用': C:/OpenCV2.0/include/opencv/cvcompat.h:291: 未定义对_cvPow'
./src/Open_CV.o: In function
cvbInvSqrt'的引用': C :/OpenCV2.0/include/opencv/cvcompat.h:301: 未定义对_cvPow'
./src/Open_CV.o: In function
cvbReciprocal' 的引用:C:/OpenCV2.0/include/opencv/cvcompat.h:311: 未定义对_cvPow'
./src/Open_CV.o: In function
cvbFastExp' 的引用:C:/OpenCV2。 0/include/opencv/cvcompat.h:319:未定义对_cvExp'
./src/Open_CV.o: In function
cvbFastLog 的引用:C:/OpenCV2.0/include/opencv/cvcompat.h:327:未定义对_cvLog'
./src/Open_CV.o: In function
cvPseudoInverse 的引用:C:/OpenCV2.0/include/ opencv/cvcompat.h:339:对_cvInvert'
./src/Open_CV.o: In function
cvProject3D 的未定义引用:C:/OpenCV2.0/include/opencv/cvcompat.h:473:对_cvTransform'
./src/Open_CV.o: In function
cvFindFundamentalMatrix 的未定义引用:C:/OpenCV2.0/include/opencv/cvcompat。小时:549:未定义的引用_cvCreateMat'
C:/OpenCV2.0/include/opencv/cvcompat.h:550: undefined reference to
_cvCreateMat' C:/OpenCV2.0/include/opencv/cvcompat.h:566: 未定义引用_cvReleaseMat'
C:/OpenCV2.0/include/opencv/cvcompat.h:567: undefined reference to
_cvReleaseMat' ./src/Open_CV.o: 在函数cvUnDistortInit':
C:/OpenCV2.0/include/opencv/cvcompat.h:774: undefined reference to
_cvGetRawData' ./src/Open_CV.o: 在函数cvUnDistort':
C:/OpenCV2.0/include/opencv/cvcompat.h:790: undefined reference to
_cvGetRawData' ./ src/Open_CV.o: 在函数cvKMeans':
C:/OpenCV2.0/include/opencv/cvcompat.h:816: undefined reference to
_cvCreateMat' C:/OpenCV2.0/include/opencv/cvcompat.h:821: 未定义引用_cvKMeans2'
C:/OpenCV2.0/include/opencv/cvcompat.h:822: undefined reference to
_cvReleaseMat' ./src/Open_CV.o: 在函数cvStartScanGraph':
C:/OpenCV2.0/include/opencv/cvcompat.h:833: undefined reference to
_cvError' C:/OpenCV2.0 /include/opencv/cvcompat.h:835: 未定义对_cvCreateGraphScanner'
C:/OpenCV2.0/include/opencv/cvcompat.h:837: undefined reference to
cvFree的引用' ./src/Open_CV.o: 在函数cvEndScanGraph':
C:/OpenCV2.0/include/opencv/cvcompat.h:844: undefined reference to
_cvError' C:/OpenCV2.0/include/opencv/cvcompat.h:848: 未定义引用_cvAlloc'
C:/OpenCV2.0/include/opencv/cvcompat.h:850: undefined reference to
_cvReleaseGraphScanner' ./src/Open_CV.o: 在函数cvLineAA':
C:/OpenCV2.0/include/opencv/cvcompat.h:863: undefined reference to
_cvGetElemType' C:/OpenCV2.0/include/opencv/cvcompat.h:863: 未定义的引用_cvColorToScalar'
C:/OpenCV2.0/include/opencv/cvcompat.h:863: undefined reference to
_cvLine' ./src/Open_CV.o: 在函数cvCircleAA':
C:/OpenCV2.0/include/opencv/cvcompat.h:869: undefined reference to
_cvGetElemType' C:/OpenCV2.0/include/opencv/cvcompat.h:869: 未定义引用_cvColorToScalar'
C:/OpenCV2.0/include/opencv/cvcompat.h:869: undefined reference to
_cvCircle' ./src/Open_CV.o: 在函数cvEllipseAA':
C:/OpenCV2.0/include/opencv/cvcompat.h:877: undefined reference to
_cvGetElemType' C: /OpenCV2.0/include/opencv/cvcompat.h:877: 未定义引用_cvColorToScalar'
C:/OpenCV2.0/include/opencv/cvcompat.h:877: undefined reference to
_cvEllipse'makefile:30: 目标Open_CV.exe' failed
./src/Open_CV.o: In function
cvPolyLineAA' 的配方: C:/OpenCV2.0/include/opencv/cvcompat.h:884: 未定义引用_cvGetElemType'
C:/OpenCV2.0/include/opencv/cvcompat.h:884: undefined reference to
_cvColorToScalar' C:/OpenCV2.0/include/opencv/cvcompat.h:884: undefined reference to `_cvPolyLine' collect2: ld returned 1 exit status make: * [Open_CV.exe] Error 1