Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/157.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/opencv/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
OpenCV、eclipse编译问题 我有一个编译问题,我不能在C++中找到OpenCV2.1。_C++_Opencv_Mingw_Eclipse Cdt - Fatal编程技术网

OpenCV、eclipse编译问题 我有一个编译问题,我不能在C++中找到OpenCV2.1。

OpenCV、eclipse编译问题 我有一个编译问题,我不能在C++中找到OpenCV2.1。,c++,opencv,mingw,eclipse-cdt,C++,Opencv,Mingw,Eclipse Cdt,下面是我试图编译的一个简单测试代码: #include <iostream> #include "cv.h" using namespace std; int main() { cout << "Hello World" << endl; // prints !!!Hello World!!! cv::Mat mtx; return 0; } 错误是C:/OpenCV2.1/include/opencv/cxmat。hpp:378

下面是我试图编译的一个简单测试代码:

#include <iostream>
#include "cv.h"

using namespace std;

int main() {
    cout << "Hello World" << endl; // prints !!!Hello World!!!
    cv::Mat mtx;
    return 0;
}
错误是C:/OpenCV2.1/include/opencv/cxmat。hpp:378:未定义对“cv::fastFree(void*)”的引用。

我相信我已经通过上面的命令正确编译了所有的库…问题是什么


谢谢

尽管消息表明它没有在OpenCV库上找到该符号,但我必须指出,从上面粘贴的命令行来看,您似乎正在尝试将应用程序与64位编译库相链接,如
-LC:\Program Files\point Grey Research\FlyCapture2\lib64
所示。这意味着您必须将OpenCV编译为64位,或者将两者编译为32位


您可能缺少一个库。在Windows上,我的OpenCV项目通常会添加
cv210.lib cvaux210.lib cxcore210.lib cxts210.lib highgui210.lib
,但我大多数时候都使用Visual Studio 2005。

当OpenCV库是用英特尔TBB并行库构建时,链接cv::fastfree时遇到问题,没有TBB的构建工作正常

**** Build of configuration Debug for project CJMVideo ****

**** Internal Builder is used for build               ****
g++ -IC:\OpenCV2.1\include\opencv -IC:\Program Files\Point Grey Research\FlyCapture2\include -O0 -g3 -Wall -c -fmessage-length=0 -osrc\CJMVideo.o ..\src\CJMVideo.cpp
g++ -LC:\OpenCV2.1\lib -LC:\Program Files\Point Grey Research\FlyCapture2\lib64 -Xlinker --enable-auto-import -oCJMVideo.exe src\CJMVideo.o -lcxcore210 -lcv210 -lhighgui210 -lml210 -lFlyCapture2
src\CJMVideo.o:C:/OpenCV2.1/include/opencv/cxmat.hpp:378: undefined reference to `cv::fastFree(void*)'
collect2: ld returned 1 exit status
Build error occurred, build is stopped
Time consumed: 1438  ms.