Visual Studio 2012 and OpenCV 2.4.9 [closed]

asked 2014-08-16 14:41:10 -0600

residentx gravatar image

updated 2014-08-16 18:08:56 -0600

I have some questions about installing all this stuff. I tried to do it but I have questions. I also have links to images to make things easier for comments.

I'm using Visual Studio 2012 Ultimate with OpenCV 2.4.9.

Step 1: I downloaded the .exe and ran it. I created a folder called OpenCV2.4. Question 1: Do I still need to use CMAKE here?

Step2: I tried to do this without CMAKE, and I was able to create a project but I have questions.

Question 2: Do I still need to add a system path?

Question 3: We should be using the build directory not the source, right?

Question 4: I'm creating the properties sheet but what has the Libraries been renamed to? Edit: I think I have to go in Build/x86/select(edit: changed to x86) and select the version of my visual studio and then the lib folder?

I'm working on this now...I may edit this later.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by StevenPuttemans
close date 2014-08-19 03:01:56.372594

Comments

  1. most probably not. (though the supplied libs are kinda bare-metal. if you want cuda/ocl/tbb/whatever support, you will have to recompile using cmake

  2. yes, for sure.

  3. for the include path, yes.

berak gravatar imageberak ( 2014-08-16 14:54:53 -0600 )edit

I'm really close to getting this running. Let me list my steps so I can make sure everyone who wants to comment can get an idea of what I'm dealing with

  1. Downloaded the .exe.
  2. Installed it into a C:\OpenCV2.4 folder
  3. Created a C++ console empty App and configured the Win32 App Wizard.
  4. Opened the Property Manager and created 2 Property Sheets(*debug.props(dfiles) & *.release.props(regular)).
  5. Added the 19 libraries to each prop and configured the lib & Include settings.
  6. Created a source file and coded with sample code to test my app.
  7. Added an image to my solution and reference it in my code.
  8. Compiled the code.
  9. The Error message I received, opencv_core249.dll is missing.

screenshot: http://1drv.ms/1qfNaYo

residentx gravatar imageresidentx ( 2014-08-16 17:55:44 -0600 )edit
1

You need to modify the PATH environment variable to point to the directory that contains the DLLs. You are almost there.

unxnut gravatar imageunxnut ( 2014-08-16 20:02:44 -0600 )edit

This is so weird. The system can't find it but when I go to the bin folder I can see it.

So here's what I've done. I edited the environment/system variable and put this in.

OpenCV2.4_DIR (My OpenCV folder name is OpenCV2.4)

C:\OpenCV2.4\opencv\build\x86\vc11\bin

This should work, right? Maybe I need to reboot my machine.

residentx gravatar imageresidentx ( 2014-08-17 15:05:54 -0600 )edit

I have to edit the "Path" Variable. Thanks.

residentx gravatar imageresidentx ( 2014-08-17 15:16:51 -0600 )edit

Now I'm getting some kind of Access violation.

Here's the details from the output window:

'ConsoleApplication1.exe' (Win32): Loaded 'C:\Users\gcarlisle\Desktop\OpenCV\OpenCVProjects\ConsoleApplication1\Debug\ConsoleApplication1.exe'. Symbols loaded. 'ConsoleApplication1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file. 'ConsoleApplication1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file. 'ConsoleApplication1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file. 'ConsoleApplication1.exe' (Win32): Loaded 'C:\OpenCV2.4\opencv\build\x86\vc11\bin\opencv_core249d.dll'. Cannot find or open the PDB file. 'ConsoleApplication1.exe' (Win32): Loaded 'C:

residentx gravatar imageresidentx ( 2014-08-17 15:33:59 -0600 )edit

Here's the link to the image, http://1drv.ms/1oSYlVz

Here's the link to my text file with my full output, http://1drv.ms/1oSYJUd

residentx gravatar imageresidentx ( 2014-08-17 16:00:41 -0600 )edit

OpenCV Error: Assertion failed (size.width>0 && size.height>0) in cv::imshow, fi le C:\buildslave64\win64_amdocl\2_4_PackSlave-win32-vc11-shared\opencv\modules\h ighgui\src\window.cpp, line 261

residentx gravatar imageresidentx ( 2014-08-17 16:04:45 -0600 )edit

This is my final error message, I don't get breaks in my code now. It compiles but exits: The text file is here, http://1drv.ms/1uJXO0t

I think my issue is PDB files.

residentx gravatar imageresidentx ( 2014-08-17 16:23:26 -0600 )edit

Try recompiling the code (Rebuild Solution). Also make sure that the code is being compiled in 32-bit mode (x86) since that is what you have in your PATH variable.

unxnut gravatar imageunxnut ( 2014-08-17 20:03:08 -0600 )edit

I talked with Microsoft today. This is what they told me.

For “Cannot find or open the PDB file”, PDB is a debug information file used by Visual Studio. These are system DLLs, which you don’t have debug symbols for. Go to Tools->Options->Debugging->Symbols and select checkbox "Microsoft Symbol Servers", Visual Studio will download PDBs automatically. Or you may just ignore these warnings if you don't need to see correct call stack in these modules.

residentx gravatar imageresidentx ( 2014-08-18 10:38:12 -0600 )edit

Here's screenshot of what happens, http://1drv.ms/VzeDMG

I selected all but there was options for all or specified files and I'm asking for clarification about this and will post a final comment.

residentx gravatar imageresidentx ( 2014-08-18 10:44:01 -0600 )edit

All my symbols loaded except for these two:

'ConsoleApplication1.exe' (Win32): Loaded 'C:\OpenCV2.4\opencv\build\x86\vc11\bin\opencv_core249d.dll'. Cannot find or open the PDB file.

'ConsoleApplication1.exe' (Win32): Loaded 'C:\OpenCV2.4\opencv\build\x86\vc11\bin\opencv_highgui249d.dll'. Cannot find or open the PDB file.

Is this an OpenCV issue?

residentx gravatar imageresidentx ( 2014-08-18 10:58:37 -0600 )edit

Also, I tried the rebuild solution comment by unxnut and it's still the same issue, the 2 files mentioned above.

residentx gravatar imageresidentx ( 2014-08-18 11:08:13 -0600 )edit