OpenCV不能指定链接库
Cmake OpenCV Can not specify link libraries
我想运行这段我在网上找到的c++/OpenCV代码:
http://docs.opencv.org/doc/tutorials/features2d/feature_homography/feature_homography.html我有一个问题与CMake,它返回这个错误:
CMake Error at CMakeLists.txt:5 (target_link_libraries)不能为目标"SURF_Homography"指定链接库
我在网上搜索了解决方案,我发现了这个
CMake OpenCV不能指定链接库
但我不能理解为什么我的不工作,因为它看起来一样,这是我的CMakeLists文件:
cmake_minimum_required(VERSION 2.8)
project( SURF_Homography )
find_package( OpenCV REQUIRED )
add_executable( SURF_Homography.cpp SURF_Homography.cpp )
target_link_libraries( SURF_Homography ${OpenCV_LIBS} )
希望你能帮助我谢谢卢卡
更改add_executable
行:
add_executable( SURF_Homography SURF_Homography.cpp )
否则,您在target_link_libraries
行中指定的目标将不存在:)
相关文章:
- 针对静态库的 G++ 链接不起作用
- boost::存在符号链接不取消引用
- 模板外部链接不起作用
- 与LLVM LLD链接不起作用[MACOS]
- 返回值上的 C++ 方法链接不起作用
- Boost Logger静态链接:不起作用
- CMake 链接不正确?
- 链接不返回对象的运算符
- cocos2d android编译时链接不起作用
- 如果我在GCC中编译并链接不需要的库,会发生什么
- Visual Studios 9 Dll链接不一致
- 尝试使用 swig 将C++库与 C# 链接 - 不会让我添加对 C# 项目的 resulging dll 的引用
- 编译伪C++程序时链接不成功
- 为什么隐式DLL链接需要相关的Lib文件,而显式链接不需要
- CMake链接不是子文件夹
- Java c++ jni链接不满足错误
- 为什么这个c++链接不能工作?(OSX小牛)
- 共享库没有链接/不能这样做
- 动态链接boost库和自动链接不能正常工作
- GLFW链接不能正常工作与mingw32在c++ (?)