Reputation: 495
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. 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'
Do I manually have to change all ...249.. to ...243.. or is there a easier way?
Upvotes: 0
Views: 480
Reputation: 50667
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 to setup OpenCV library (similar to others) is like:
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})
Upvotes: 2