How to set up CUDA Development Environment in Visual Studio 2010 In Windows 7 , VS 2010 .

Hi, guys, I just want to get started with CUDA in Visual Studio 2010 under Windows 7 .

I insalled the softwares according to the instuctions in “GettingStarted Windows.pdf” .

I tried everything I could , it still failed in compiling bandwidthTest.cu .

And when I tried to install CudaWizard, it failed :“Cant’ find Visual Studio Install Directory!”

Anyone ever met similar problem ? Any help would be highly appreciated !

Here is the Compilation Info:

1>------ Build started: Project: bandwidthTest, Configuration: Debug x64 ------

1>C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK\C\src\bandwidthTest\bandwidthTest_vc90.vcxproj(47,5): warning MSB4011: “C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK\C\common\Cuda.props” cannot be imported again. It was already imported at “C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK\C\src\bandwidthTest\bandwidthTest_vc90.vcxproj (46,5)”. This is most likely a build authoring error. This subsequent import will be ignored.

1>C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK\C\src\bandwidthTest\bandwidthTest_vc90.vcxproj(229,5): warning MSB4011: “C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK\C\common\Cuda.targets” cannot be imported again. It was already imported at “C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK\C\src\bandwidthTest\bandwidthTest_vc90.vcxproj (228,5)”. This is most likely a build authoring error. This subsequent import will be ignored.

1> Compiling with CUDA Build Rule…

1>C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK\C\common\Cuda.targets(45,5): error MSB3721: The command "echo “(CUDA_BIN_PATH)\nvcc.exe" -m64 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin" -D_DEBUG -D_WIN32 -I"C:\CUDA\include" -I"./" -I"../../common/inc" -I"../../../shared/inc" -I"C:\CUDA\include" -Xcompiler "/EHsc /W3 /nologo /Od /Zi /MTd " -maxrregcount=32 -gencode=arch=compute_10,code=\"sm_10,compute_10\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" --compile -o "(IntDir)$(InputName).cu.obj” “C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK\C\src\bandwidthTest\bandwidthTest.cu”

1>C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK\C\common\Cuda.targets(45,5): error MSB3721: “(CUDA_BIN_PATH)\nvcc.exe" -m64 -gencode=arch=compute_10,code=\"sm_10,compute_10\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin" -D_DEBUG -D_WIN32 -I"C:\CUDA\include" -I"./" -I"../../common/inc" -I"../../../shared/inc" -I"C:\CUDA\include" -Xcompiler "/EHsc /W3 /nologo /Od /Zi /MTd " -I"C:\CUDA\include" -maxrregcount=32 -gencode=arch=compute_10,code=\"sm_10,compute_10\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" --compile -o "(IntDir)$(InputName).cu.obj” “C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK\C\src\bandwidthTest\bandwidthTest.cu”" exited with code 1.

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Did you install NSight? This makes things a lot simpler as all the build rules get setup correctly.

You might also want to read these posts:

http://www.ademiller.com/blogs/tech/2011/03/using-cuda-and-thrust-with-visual-studio-2010/

http://forums.nvidia.com/index.php?showtopic=184539

http://blog.cuvilib.com/2011/02/24/how-to-run-cuda-in-visual-studio-2010/