New CUDA project VS 2005. Beginners How to start a new CUDA project VS 2005?


I have installed CUDA SDK and I was able to run almost every project provided in SDK.

I opened one the program (device Query) and has copied your program (”My first CUDA program”)…and then rebuild the solution and when compiled I got the right output.

However my question is …how to “Start a new project”. I mean in VC++ 2005 we have “inc” folder that includes all *.h item files and like wise we have “src” folder that includes all the *.cpp item files.

How to add the *.cu item files into those directories.

And also like I found CUDA programs are compiled when they are created in the CUDA SDK folder. Programs created in the default Visual Studio 2005 folder are not. What could be the problem? :argh: :argh: :argh:


to start a new CUDA project “from scratch”, you’re going to need 3rd party “VS2005 CUDA wizard”, which you can find here in the forum:

Please note that this is not an official NVidia tool.


Thank you for reply. :clap:

Ok I will try that tool. However is their no other way than to depend on that tool. :blush:


Mmm…, well, you may edit “Custom Rules” in the Project properties.

Somewhere in the forum, there were some messages about the Custom Rules you have to use, sorry I don’t have the link (maybe there’s something in the CUDA docs too).

Basically, it boils down to tell VS that .cu files are to be passed to NVCC, which then will pass C/C++ code to the VS compiler.

I did not check this method, since the VS2005 Wizard is so simple and effective (you may also generate DLLs): it adds a new Project Type to VS2005 (you know, along with Windows Console Application, etc.)