0

I have followed the intrunctions here to the core.

And they run perfect on Windows 7 32 bit machine. But I use the same instructions with Windows 7 64 bit machine. I get the following error.

error LNK2019: unresolved external symbol _cvDestroyAllWindows referenced in function "void * __cdecl trial1(void *)" (?trial1@@YAPAXPAX@Z)

and similarly for other openCV methods.

I have made changes in my Configuration Manager and added x64 to the Solutions Platform but still getting the errors.

1 Answer 1

1

You need to link the *.lib files in the project properties. They is a lib file for every header file included in the code. i.e. opencv2/core has lib opencv_core.lib

Sign up to request clarification or add additional context in comments.

3 Comments

Jason I have added them in Liker->Input->Additional Dependencies as mentioned in the link I referred. My exact files are -------------------------------------------------------------------- opencv_calib3d243d.lib opencv_contrib243d.lib opencv_core243d.lib opencv_features2d243d.lib opencv_flann243d.lib opencv_gpu243d.lib opencv_haartraining_engined.lib opencv_highgui243d.lib opencv_imgproc243d.lib opencv_legacy243d.lib opencv_ml243d.lib opencv_nonfree243d.lib opencv_objdetect243d.lib opencv_photo243d.lib but I have changed the 3 at the end to 4 since I am using OpenCV 2.4.4
Are the lib and your code both x64 or both x32? If you compile for x64, you must include x64 compiled library files and vice versa.
The libs I have included are all x64 as I am using a 64bit machine. I was able to run this code in Windows 7 64 bit using Visual Studio 2010. But I don't know why it just doesn't work in Visual C++ when used in 64 bit machine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.