Steps to configure CUDA 4.0 in Visual Studio 2010
Install Visual Studio 2010.
Download the following from NVIDIA site and install them all
“http://developer.nvidia.com/cuda-toolkit-40”
Developer Drivers for WinXP 32bit
CUDA Toolkit 32bit
NEW CUDA Toolkit 4.0 Build Customization BUG FIX Update
Fixes error message “$(CUDABuildTasksPath) property is not valid”
GPU Computing SDK - complete package including all code samples
Install all of the above in the order.
Now open Visual Studio 2010,
New → Project → Win32 Console Application
Name: “HelloCuda” → OK → Next → Empty project → Finish
Right Click the project HelloCuda → Build Customizations
Click Find Existing and Navigate to CUDA 4.0.targets
C:\ProgramFiles\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\CUDA 4.0.targets
Now create a textfile and save it as HelloWorld with .cu Extension
Now you will have a file HelloWorld.cu
Add this file to the project HelloCuda
Right Click HelloWorld.cu → Configuration Properties → General → Item Type → CUDA C/C++
Now right click project HelloCuda → Configuration Properties → CUDA C/C++ → Common → Additional Include Directories
Add C:\Documents and Settings\All Users\Application Data\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0\C\common\inc;
Now right click project HelloCuda → Configuration Properties → Linker → General → Additional Library Directories
Add D:\Documents and Settings\All Users\Application Data\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0\C\common\lib;
Linker → Input → Additional Dependencies → cudart.lib
Now write a sample CUDA C Program inside HelloWorld.cu and Compile.
You are all done.