本文介绍了带有Visual Studio C ++ 2008的OpenCV 2.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已遵循有关如何安装和准备使用OpenCV的说明.
但是在运行包含cv.h的代码时,出现链接器错误

I have followed instructions how to install and prepare for use OpenCV.
But while running code that includes cv.h I''m getting linker errors

CPP_DS_CapSample.obj : error LNK2028: unresolved token (0A0008E6) "void __cdecl cv::fastFree(void *)" (?fastFree@cv@@$$FYAXPAX@Z) referenced in function "public: void __thiscall cv::Mat::release(void)" (?release@Mat@cv@@$$FQAEXXZ)
1>CPP_DS_CapSample.obj : error LNK2019: unresolved external symbol "void __cdecl cv::fastFree(void *)" (?fastFree@cv@@$$FYAXPAX@Z) referenced in function "public: void __thiscall cv::Mat::release(void)" (?release@Mat@cv@@$$FQAEXXZ)



我坚持下去.

我确实使用CMake创建文件.
然后在cmakecompile文件夹中编译整个项目
我确实添加了环境变量-:
的路径C:\ OpenCV2.0 \ cmakecompile \ bin \ Debug; C:\ OpenCV2. 0 \ cmakecompile \ bin \ Release

在工具"->选项"->"VC ++目录"中添加:
在可执行文件中:
C:\ OpenCV2.0 \ cmakecompile \ bin \ Debug
C:\ OpenCV2.0 \ cmakecompile \ bin \ Release
在包含文件中:
C:\ OpenCV2.0 \ include \ opencv
在库文件中:
C:\ OpenCV2.0 \ cmakecompile \ lib \ Debug
C:\ OpenCV2.0 \ cmakecompile \ lib \ Release

但还是不高兴.



I''m stuck with it.

I did create files with CMake.
And then compiled whole project in cmakecompile folder
I did add environment variables - paths to :
C:\OpenCV2.0\ cmakecompile\ bin\Debug; C:\OpenCV2. 0\cmakecompile\ bin\Release

In Tools->Options->VC++ Directiories added:
in Executible files:
C:\OpenCV2.0\ cmakecompile\ bin\Debug
C:\OpenCV2.0\ cmakecompile\ bin\Release
in Include files:
C:\OpenCV2.0\ include\opencv
in Library files:
C:\OpenCV2.0\ cmakecompile\ lib\Debug
C:\OpenCV2.0\ cmakecompile\ lib\Release

But still no joy.

推荐答案




这篇关于带有Visual Studio C ++ 2008的OpenCV 2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 00:29