Click here to Skip to main content
15,893,190 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
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

VB
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)


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.
Posted
Updated 5-Mar-10 0:38am
v2
Comments
roboticsyuth 4-Jul-10 7:14am    
Reason for my vote of 2
goog

Please try it in your source :) :
#pragma comment(lib, "TheFirstNeededCPLib.lib")
#pragma comment(lib, "TheSecondNeededCPLib.lib")
...
 
Share this answer
 
OK :)
Yes, you could set them separated by space in the:
poject->property->linker->input->additional dependencies :)

 
Share this answer
 
v2
Comments
roboticsyuth 4-Jul-10 7:14am    
Reason for my vote of 1
good
Hmmm

I've added those:

C#
#pragma comment (lib, "cv200.lib")
#pragma comment (lib, "cvaux200.lib")
#pragma comment (lib, "cxcore200.lib")
#pragma comment (lib, "cxts200.lib")
#pragma comment (lib, "highgui200.lib")


and IT WORKS :)

Thank you

Is there any other equivalent of this operation that works project wide?
 
Share this answer
 
It works tried it again and it was fine I guess I had to omit something first time I tried that.
Funny enough I was trying it before my first post here,
at least now I know more elegant way.

Thanx
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900