简体   繁体   English

OpenCV 2.4.3到2.4.9版本更改

[英]OpenCV 2.4.3 to 2.4.9 version change

I'm taking over a project that someone else started two years ago with OpenCV2.4.3 and I now downloaded OpenCV2.4.9 because I couldn't find 2.4.3 anymore. 我正在接管另一个人两年前开始使用OpenCV2.4.3的项目,现在我下载了OpenCV2.4.9,因为我找不到2.4.3。 When I try to compile in Visual Studio 12 it says: 1>LINK : fatal error LNK1104: cannot open file 'C:\\OpenCV2.4.3\\lib\\Debug\\opencv_core243d.lib' 当我尝试在Visual Studio 12中进行编译时,它说:1> LINK:致命错误LNK1104:无法打开文件'C:\\ OpenCV2.4.3 \\ lib \\ Debug \\ opencv_core243d.lib'

Do I manually have to change all ...249.. to ...243.. or is there a easier way? 我需要手动将所有... 249 ..更改为... 243 ..还是有更简单的方法?

CMake is the much better way to handle such problems, all you need is to re-build on your PC and it will set all these stuffs for you. CMake是处理此类问题的更好方法,您所需要的只是在PC上重新构建,它将为您设置所有这些内容。

CMake to setup OpenCV library (similar to others) is like: CMake设置OpenCV库(类似于其他库)就像:

find_package(OpenCV REQUIRED)
include_directories(${OPENCV_INCLUDE_DIRS})
link_directories(${OPENCV_LIBRARY_DIRS})
add_definitions(${OPENCV_DEFINITIONS})  
target_link_libraries(your-project ${OpenCV_LIBS})

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM