我打算在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:11612中包含的文件中,来自/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:11666:警告:已定义但未使用"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:11141:警告:已定义但未使用"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/cvcompt.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/cvcompt.h:141:警告:已定义但未使用"cvMean_StdDev"C:/OpenCV2.0/include/opencv/cvcompat.h:154:警告:已定义但未使用"cvmPerspectiveProject"C:/OpenCV2.0/include/opencv/cvcompt.h:165:警告:已定义但未使用"cvFillImage"C:/OpenCV2.0/include/opencv/cvcompt.h:216:警告:已定义但未使用"cvRandInit"C:/OpenCV2.0/include/opencv/cvcompt.h:249:警告:已定义但未使用"cvbRand"C:/OpenCV2.0/include/opencv/cvcompat.h:257:警告:已定义但未使用"cvbPartners ToPolar"C:/OpenCV2.0/include/opencv/cvcompat.h:273:警告:已定义但未使用"cvbAstArctan"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:警告:已定义但未使用"cvbInterversal"C:/OpenCV2.0/include/opencv/cvcompat.h:316:警告:已定义但未使用"cvbCastExp"C:/OpenCV2.0/include/opencv/cvcompat.h:324:警告:已定义但未使用"cvbCastLog"C:/OpenCV2.0/include/opencv/cvcompt.h:332:警告:已定义但未使用"cvContourBoundingRect"C:/OpenCV2.0/include/opencv/cvcompt.h:338:警告:已定义但未使用"cvPseudoInverse"C:/OpenCV2.0/include/opencv/cvcompt.h:385:警告:已定义但未使用"cvConvexHull"C:/OpenCV2.0/include/opencv/cvcompt.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:446:警告:已定义但未使用"cvProject3D"C:/OpenCV2.0/include/opencv/cvcompt.h:506:警告:已定义但未使用"cvHoughLines"C:/OpenCV2.0/include/opencv/cvcompt.h:519:警告:已定义但未使用"cvHoughLinesP"C:/OpenCV2.0/include/opencv/cvcompt.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:警告:已定义但未使用"cvCalibrateCamer"C:/OpenCV2.0/include/opencv/cvcompat.h:613:警告:已定义但未使用"cvCalibrateCamera_64d"C:/OpenCV2.0/include/opencv/cvcompat.h:642:警告:已定义但未使用"cvFindExtrinicCameraParams"C:/OpenCV2.0/include/opencv/cvcompat.h:667:警告:已定义但未使用"cvFindExtrinicCameraParams_64d"C:/OpenCV2.0/include/opencv/cvcompt.h:693:警告:已定义但未使用"cvRodrigues"C:/OpenCV2.0/include/opencv/cvcompt.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/cvcompt.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调用:跨GCC链接器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/cvcompt.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
cvbPartners ToPolar的引用:C:/OpenCV2.0/include/opencv/cvcompat.h:267:未定义对_cvCartToPolar'
./src/Open_CV.o: In function
cvbAstArctan'的引用: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
cvb交互的引用:C:/OpenCV2.0/include/opencv/cvcompat.h:311:对_cvPow'
./src/Open_CV.o: In function
cvbastExp'的未定义引用:C:/OpenCV2.0/include/opencv/cvcompat.h:319:未定义对_cvExp'
./src/Open_CV.o: In function
cvbLastLog'的引用:C:/OpenCV2.0/include/opencv/cvcompt.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.h: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:对"_cvPolyLine"的未定义引用collect2:ld返回1退出状态make:*[Open_CV.exe]错误1
我想您错过了链接libcxcore"-lcxcore"(或者可能是"-lcvaux")。