I have built Opencv using Cmake and then I am trying to run this code:
// OpenCV_Helloworld.cpp : Defines the entry point for the console application.
// Created for build/install tutorial, Microsoft Visual C++ 2010 Express and OpenCV 2.1.0
return 0;
}
But the error I am getting is :
1>------ Build started: Project: OpenCV_HelloWorld1, Configuration: Debug x64 ------
1>Open_HelloWorld1.obj : error LNK2019: unresolved external symbol cvReleaseImage referenced in function wmain
1>Open_HelloWorld1.obj : error LNK2019: unresolved external symbol cvDestroyWindow referenced in function wmain
1>Open_HelloWorld1.obj : error LNK2019: unresolved external symbol cvWaitKey referenced in function wmain
1>Open_HelloWorld1.obj : error LNK2019: unresolved external symbol cvShowImage referenced in function wmain
1>Open_HelloWorld1.obj : error LNK2019: unresolved external symbol cvNamedWindow referenced in function wmain
1>Open_HelloWorld1.obj : error LNK2019: unresolved external symbol cvLoadImage referenced in function wmain
1>C:\Users\Pratik\documents\visual studio 2010\Projects\OpenCV_HelloWorld1\x64\Debug\OpenCV_HelloWorld1.exe : fatal error LNK1120: 6 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I have tried various combination i the net , please help me out
Did you link against opencv libraries ? I don't see any #pragma comment (lib, "<library name here>") in your code.
Of course, the linked in libraries can also be set from the Visual Studio IDE.
I am very new to this, please help me in how to do so . Please help.If u can give me an example taking the above code in to consideration it would be very helpful.
Regards,
tranquished.
If you're unable to link against libraries after searching for a long time, perhaps a much simpler and easier IDE would be a good idea, or even abandoning an IDE and doing it from the command line (where it's very simple).
If you don't know how to add a library to Visual Studio, for which there are plenty of tutorials and comprehensive help in MSDN then maybe programming is not for you.