There are many forums out there with unresolved threads where people are having linker problems with OpenCV. This is because performing the usual steps for setting up the paths and the linker like you would normally do for a project wont work! This is not because those are not the steps that should be performed, its just that if you go to the OpenCV website at: http://opencv.willowgarage.com/wiki/ it will tell you that the latest version is 2.1 which you can click and will take you to this page: http://sourceforge.net/projects/opencvlibrary/ .
By all means download that and stick it somewhere you will link to later. The problem is that when you set up the include and library directories and set additional dependencies to: " cv.lib highgui.lib cxcore.lib " (dont include the quotation marks)
What I did next is:
1. set the include and lib directories respectively to that opencv folder you just set, ie:
C:\OpenCV2.0\include\opencv
C:\OpenCV2.0\lib
Now go here: http://sourceforge.net/projects/opencvlibrary/files/ and download opencv-win (below the opencv-unix folder) 1.1pre1 OpenCV_1.1pre1a.exe file and run it. Go to your program files where it default installs and go to the lib directory.
and copy all those lib files. Now go to the lib directory in the OpenCV2.0 file that you downloaded earlier and delete all its contents and replace with the library files you just copied from 1.1pre.
Now Bobs your Uncle and everthing should link and work. Best of luck!
No comments:
Post a Comment