Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

CUDA on Visual Studio 2010: To build libraries or not?

I am trying to do something really, really simple: Get CUDA to work on Visual Studio 2010 Express.

I have tried SO MANY things now that it is not even funny, and whenever I venture down a new path I eventually end up at a non-working dead-end.

All I want to know is: (A) Do I have to build the libraries with CMake or (B) can I simply use the libraries supplied with "OpenCV-2.4.3.exe"?

If the answer is (A):

  1. Do I have to download the latest version off of GIT repositories or will the files in OpenCV-2.4.3.exe be sufficient?
  2. I followed this guide and to my great joy there were no real errors. I got all the way down to setting up a property sheet. However, when I had to set up VS2010 the .lib files had not been created with a Debug and Release version. So I stopped. And cried. What do I have to do to create both Debug and Release version of the .lib files? What am I doing wrong? Am I really such a bad person? I need a hug :(

If the answer is (B):

  1. Woohoo, great! That means I can say goodbye to CMake and whathaveyou. But how exactly do I set up VS2010 so that GPU code will work on it? What do I have to refer to where? I have followed guides before on how to set up OpenCV, so it's not that I am too lazy to perform a google search. I have just done exactly what the guides say, and "regular" OpenCV works fine. But GPU doesn't. So I am thinking it must be because I am doing something wrong. Anyone with a working VS2010 (or 2008 for that matter) with GPU please share your settings.

Thank you all in advance!

These are my software and hardware credentials (if anyone need them): Windows 7 32-bit, CUDA Toolkit and SDK 4.2, OpenCV 2.4.3, Visual Studio 2010 Express (I have Visual Studio 2008 as well), CMake 2.8.10, nVidia Quadro 1000M with driver 301.27.

click to hide/show revision 2
Added link to my final solution.

CUDA on Visual Studio 2010: To build libraries or not?

I am trying to do something really, really simple: Get CUDA to work on Visual Studio 2010 Express.

I have tried SO MANY things now that it is not even funny, and whenever I venture down a new path I eventually end up at a non-working dead-end.

All I want to know is: (A) Do I have to build the libraries with CMake or (B) can I simply use the libraries supplied with "OpenCV-2.4.3.exe"?

If the answer is (A):

  1. Do I have to download the latest version off of GIT repositories or will the files in OpenCV-2.4.3.exe be sufficient?
  2. I followed this guide and to my great joy there were no real errors. I got all the way down to setting up a property sheet. However, when I had to set up VS2010 the .lib files had not been created with a Debug and Release version. So I stopped. And cried. What do I have to do to create both Debug and Release version of the .lib files? What am I doing wrong? Am I really such a bad person? I need a hug :(

If the answer is (B):

  1. Woohoo, great! That means I can say goodbye to CMake and whathaveyou. But how exactly do I set up VS2010 so that GPU code will work on it? What do I have to refer to where? I have followed guides before on how to set up OpenCV, so it's not that I am too lazy to perform a google search. I have just done exactly what the guides say, and "regular" OpenCV works fine. But GPU doesn't. So I am thinking it must be because I am doing something wrong. Anyone with a working VS2010 (or 2008 for that matter) with GPU please share your settings.

Thank you all in advance!

These are my software and hardware credentials (if anyone need them): Windows 7 32-bit, CUDA Toolkit and SDK 4.2, OpenCV 2.4.3, Visual Studio 2010 Express (I have Visual Studio 2008 as well), CMake 2.8.10, nVidia Quadro 1000M with driver 301.27.

EDIT: I got it to work! Check out this thread: http://stackoverflow.com/questions/13228762/opencv-2-4-3rc-and-cuda-4-2-opencv-error-no-gpu-support/13231205#13231205