Ms Visual Studio and OpenCV

Submitted by patrick on Fri, 03/28/2008 - 15:50

Printer-friendly version

Step 1: Installing the software

Install Ms Visual Studio 2008

See the Microsoft website for instructions on how to obtain MSVS (Microsoft Visual Studio).

Install OpenCV

See this website for instructions.

Install the Ms SDK

See this website for instructions.

Step 2: Setting up MSVS

Include opencv in the project settings from MSVS. See this webpage for instructions. I will not copy them as that can only introduce errors.

Step 3: Setting up Ms Windows

All that is left now is the PATH settings from Windows.

First right click on “My Computer”, click on "Properties" then “Advanced System Settings” and finally "Environment Variables".

Now we have to add the path of the OpenCV /lib directory to the “PATH” in the System “Variables window”

Finally

... this is all to get running. Now you can start to get moving with the powerfull OpenCV framework.

Comments

16 comments posted
found the fix

I also had problem with cxcore110.dll not found.  The fix, make sure you have no spaces after the previous entry in PATH variable when adding the openCV/bin;  It is sensitive to all characters including spaces
:)

Posted by Anonymous on Thu, 09/10/2009 - 21:46
It doesn't work because you

It doesn't work because you didn't explain how to link the files.

John Del

Posted by Anonymous on Wed, 04/22/2009 - 06:31
Doesn't work

I've followed the instructions above to the point including building the OpenCV debug and release versions successfully. It still doesn't work every time I try to use any cx... files i get cxcore110.dll error. The opencv programs not involving those files work fine... I'm getting rather desperate atm... Please advice if there is anything else I can do?

//Martin

Posted by Anonymous on Fri, 04/03/2009 - 15:49
I also experimented the same

I also experimented the same problem...

If I remember well, try to do this:

Check your environnement variables. In my case, the "OpenCV/bin" directory was in the user PATH variable. I added also in the system PATH variable, and since I did this, I never experimented the problem anymore.

Posted by Anonymous on Mon, 04/06/2009 - 20:37
And I have windows xp not

And I have windows xp not vista.

Posted by Anonymous on Fri, 04/03/2009 - 15:51
Me too

I also have Windows XP and not Vista... or at least, I had when writing and installing this.

So it should work!!!

BUT you need to follow the links I provided very(!) carefully.

I also recommend you to be sure you remoev everything before you try to reinstall it. WHen I mean everything... I mean everything! So double check that you have no classpath somewhere anymore, or old files.

Then try again. I did it on more then 1 machine and multiple times... I am sure it works (you can also see it in the other comments).

The only part where it could still go wrong is, if they changes something to some of the software I described (newer Servicepack, updated version, using different version of MsVS).

Posted by patrick on Sat, 04/04/2009 - 23:40
Path

I will try to reinstall it, do i need all the docs and samples for Ms SDK or are the dev-files enough? And about the paths, I have had both bin and lib directory in the system path variable. I've tried to have it in both the user and system path variables and I even tried adding it to the system classpath. It still didn't work. I followed the installation for opencv with both rebuilding debug/release versions and installing the 2005 sp1 thing (although the installation didn't seem to finish, it showed up in the installed programs list).

Easier OpenCv programs work but I still get cxcore110.dll error for my programs that work perfectly at home.

//Martin

Posted by Anonymous on Wed, 04/08/2009 - 14:23
Fail...

I removed everything (including all the paths) and reinstalled according to your guid and the OpenCv wiki. I installed all ms sdk files and added only \lib and \bin to system path. I recompiled the debug and relese successfully but I still get the same problem... Plese help.. I'm getting rather desperate at this...

Posted by Anonymous on Wed, 04/08/2009 - 17:48
Please help....

Hi,

I installed OpenCV with Visual Studio 2008 on Windows Vista. I have followed all the steps mentioned. I wrote a simple program for inversion of an image. It is compiling properly but when I try and run it, I get the following error- "LDR: LdrpWalkImportDescriptor() failed to probe C:\Program Files\OpenCV\bin\cxcore110.dll for its manifest, ntstatus 0xc0150002 "

Please tell me what can I do?

Thanks

Posted by Anonymous on Wed, 11/12/2008 - 12:17
use version 1.0

I had the same problem - a dependency problem in the dll's. I rolled back to version 1.0 of OpenCV and it was fine. From a few things I read online it looks like it might be depending on a Vista only dll? Not sure.

Posted by Anonymous on Thu, 12/04/2008 - 08:44