Integrating CUDA with Visual Studio 2008


I’m quite new to CUDA, and I want to integrate the nvcc compiler with Visual Studio 2008. I took a look at this:…-with-visual-c/

But it says CUDA doesn’t support Visual Studio 2008. Is there a way to make CUDA work under Visual Studio 2008? Or another way to make a CUDA dll then through Visual Studio? (I’m not familiar with Visual Studio either :"> )

CUDA now does support VS 2008, that’s an old article.

full support of VS2008 in CUDA 2.2 :) just download everything and you are set

Great, but how can I make nvcc my compiler for .cu files? I’m brand new with Visual Studio you see, I usually program in Linux, but at my job I have to use Visual Studio, so I really don’t know how to do things there. Any help is appreciated. I tried doing what stands in the link, but no luck :(

Easisest way would be to use the CUDA VS Wizard
It will create a project with a sample cu file that will be configured for compilation with nvcc.
Then you simply click the build button in VS 2008.

After installing CUDA SDK check this file for Quick Start Instructions :

\NVIDIA CUDA SDK\doc\CUDA_SDK_release_notes_windows.txt

in this file check “II. Creating Your Own CUDA Program”,

By following the instructions, you can create your own project with template of CUDA SDK in you CUDA SDK directory/projects/yourprojectname.

CUDA SDK samples use some library and header files in CUDA SDK directory for example cutil.h . so if you want to change the location of your project you have to add this library and header file.

This links help you how to change command line options for custom command line in visual studio for cuda samples.

Check these link:…-with-visual-c/…t-cuda-program/

Seems some years have passed since you asked this, but well, I hope this could be useful for some people in the future since google bring me to this topic when i was trying to do this:

this tutorial is just perfect and it works nice.