5 Replies - 685 Views - Last Post: 01 April 2013 - 10:26 PM Rate Topic: -----

#1 IngeniousHax  Icon User is offline

  • |>|20-514<|{3|2

Reputation: 78
  • View blog
  • Posts: 1,358
  • Joined: 28-March 09

OpenCV + VS2012 help

Posted 27 March 2013 - 08:17 PM

I can't seem to get anything to be recognized in VS2012. I have OpenCV2.4.* installed and I have all the dll's and libs and all that stuff, followed the tutorial on the OpenCV website to get it up and running with VS2010, figured I could figure it out for 2012, but I can't....


Can anyone help me get this set up please?

P.S. - I have also googled many times, but only come up with VS2008 and VS2010
Is This A Good Question/Topic? 0
  • +

Replies To: OpenCV + VS2012 help

#2 IngeniousHax  Icon User is offline

  • |>|20-514<|{3|2

Reputation: 78
  • View blog
  • Posts: 1,358
  • Joined: 28-March 09

Re: OpenCV + VS2012 help

Posted 27 March 2013 - 09:41 PM

Update::

So far I have gotten the project to "build" under the debug setting, but when building under the release setting I get the following errors:
1>Source.obj : error LNK2001: unresolved external symbol _cvWaitKey
1>Source.obj : error LNK2001: unresolved external symbol _cvQueryFrame
1>Source.obj : error LNK2001: unresolved external symbol _cvCreateCameraCapture
1>Source.obj : error LNK2001: unresolved external symbol _cvShowImage
1>C:\Desktop\sideProjects\OpenCVTest\Release\OpenCVTest.exe : fatal error LNK1120: 4 unresolved externals


Also I have linked the following DLL's:
opencv_calib3d244.lib
opencv_contrib244.lib
opencv_core244.lib
opencv_features2d244.lib
opencv_flann244.lib
opencv_gpu244.lib
opencv_highgui244.lib
opencv_imgproc244.lib
opencv_legacy244.lib
opencv_ml244.lib
opencv_nonfree244.lib
opencv_objdetect244.lib
opencv_photo244.lib
opencv_stitching244.lib
opencv_ts244.lib
opencv_video244.lib
opencv_videostab244.lib

This post has been edited by IngeniousHax: 27 March 2013 - 10:06 PM

Was This Post Helpful? 0
  • +
  • -

#3 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3647
  • View blog
  • Posts: 11,415
  • Joined: 05-May 12

Re: OpenCV + VS2012 help

Posted 28 March 2013 - 06:36 PM

Are you pointing at the 32 bit or 64 bit versions of those libraries?
Was This Post Helpful? 0
  • +
  • -

#4 IngeniousHax  Icon User is offline

  • |>|20-514<|{3|2

Reputation: 78
  • View blog
  • Posts: 1,358
  • Joined: 28-March 09

Re: OpenCV + VS2012 help

Posted 29 March 2013 - 12:24 PM

View PostSkydiver, on 28 March 2013 - 07:36 PM, said:

Are you pointing at the 32 bit or 64 bit versions of those libraries?


I have tried both the x64 and x86 versions. I found a really good tutorial that seemed promising last night, but it also, did not work.

I ahve compiled the OpenCV .sln file and linked the libraries and set PATH variables and tried pointing to both the x86 and x64 directories. Which should I use though, and stick with?

Can I just, take all the header files included with the opencv package and copy them over into some directory that visual studio is located in?

This post has been edited by IngeniousHax: 29 March 2013 - 12:25 PM

Was This Post Helpful? 0
  • +
  • -

#5 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3647
  • View blog
  • Posts: 11,415
  • Joined: 05-May 12

Re: OpenCV + VS2012 help

Posted 29 March 2013 - 05:57 PM

The issue not the headers. The issue is that you are either pointing to the incorrect set of libraries, or you don't have all the libraries that you need.

The key in to figure out which library those missing functions are supposed to live in. Once you find out, then ensure that library is in your list above. Obviously, if it's not in the list, you'll need to add that library as another one to link in.

This post has been edited by Skydiver: 29 March 2013 - 05:58 PM

Was This Post Helpful? 0
  • +
  • -

#6 IngeniousHax  Icon User is offline

  • |>|20-514<|{3|2

Reputation: 78
  • View blog
  • Posts: 1,358
  • Joined: 28-March 09

Re: OpenCV + VS2012 help

Posted 01 April 2013 - 10:26 PM

Just for future searches I will put down how I finally got the projects to compile and run, probably not the best way, but a fix for now.

--[OpenCV 2.4.x]--
1. Add a property sheet to visual studio, both Debug and Release mode.
2. Right-click a property sheet and in C\C++ > Additional Include Directories > add "C:\opencv\build\include" (where ever your opencv install is)
3. Repeat for the other property sheet you have not done
4. in your OpenCV directory find the bin folder: C:\opencv\build\x86\vc10\bin (can be done with vc11 or x64).
5. copy all DLL's and paste them in your project folder: C:\my\user\Desktop\sideProjects\OpenCVTest2010\OpenCVTest2010 (This folder contains the Debug and Release folders)
6. Try to compile a project, squeak with glee and enjoyment, continue coding.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1