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? External ImageExternal ImageExternal Image
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.)