Settings in my visual studio 2013 just cannot work with opencv 3.0.0

asked 2015-03-29 09:13:54 -0500

L0gan gravatar image

I tried many times but whenever I want to run any programs it will give me a brunch of errors. I wonder where did it went wrong? I did the settling exactly the same according to this website, http://www.minlabz.com/how-to-install... Furthermore I also created a new property sheet under both the Debug|Win32 & Release|Win32 and did the same properties settings done on the solution explorer. Below is a simple program I tried to run to test out whether my settings are done correctly or not and the errors given when I debug and run it. I already run out of ways to make this work. Please advise.

I'm using window 7, 64bits openCV 3.0.0 beta visual studio 2013

include <opencv highgui.h="">

int main(int argc, char** argv)

{

IplImage* img = cvLoadImage(argv[1]);

cvNamedWindow("Example1", CV_WINDOW_AUTOSIZE);

cvShowImage("Example1", img);

cvWaitKey(0);

cvReleaseImage(&img);

cvDestroyWindow("Example1");

}

1>------ Build started: Project: OReilly-LearningOpenCV, Configuration: Debug Win32 ------ 1> Example 2-1.cpp 1>Example 2-1.obj : error LNK2019: unresolved external symbol _cvReleaseImage referenced in function _main 1>Example 2-1.obj : error LNK2019: unresolved external symbol _cvLoadImage referenced in function _main 1>Example 2-1.obj : error LNK2019: unresolved external symbol _cvNamedWindow referenced in function _main 1>Example 2-1.obj : error LNK2019: unresolved external symbol _cvShowImage referenced in function _main 1>Example 2-1.obj : error LNK2019: unresolved external symbol _cvDestroyWindow referenced in function _main 1>Example 2-1.obj : error LNK2019: unresolved external symbol _cvWaitKey referenced in function _main 1>c:\users\wenhua\documents\visual studio 2013\Projects\OReilly-LearningOpenCV\Debug\OReilly-LearningOpenCV.exe : fatal error LNK1120: 6 unresolved externals ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

edit retag flag offensive close merge delete

Comments

btw, using opencv's legacy c-api in 2015 is a terrible idea.

berak gravatar imageberak ( 2015-03-29 09:21:00 -0500 )edit
LBerger gravatar imageLBerger ( 2015-03-29 12:37:42 -0500 )edit