1.CUDA Toolkit and SDK CUDA Toolkit version 1.1 for Win XP CUDA SDK version 1.1 for Win XP
Ps: NVIDIA Driver for Microsoft Windows XP with CUDA Support (169.21) at the time of development, this can not be installed, if there is support for the CUDA video card, the installation of this is only valid)
During the installation, you will be reminded whether to add the SDK and Toolkit settings to the VS development environment, choose Yes, but Cuda Windows version, currently supports only 6.0. VS2003, VS2005 's toolkit bat,vs2008 seems not to support it.
2. Set System environment variables
Add the path of the installed Cuda SDK to the system environment variable:
For example C:/Program Files/nvidia corporation/nvidia CUDA sdk/bin/win32/
Under the
├─debug
├─emudebug
├─emurelease
└─release
Several directories are added to the system environment variable to find the corresponding DLL library when the program is run.
3.vs2005 Build a Cuda simple project
A. Creating a simple empty Win32 project
B. Add a new item and modify it yourself to EXAMPLE.CU
C. Right-click EXAMPL.CU Select Custom Compilation options
The command line adds "$ (cuda_bin_path)/nvcc.exe"-ccbin "$ (VCInstallDir) BIN"-deviceemu-c-d_debug-dwin32-d_console-d_mbcs- Xcompiler/ehsc,/w3,/nologo,/wp64,/od,/zi,/rtc1,/mtd-i "$ (cuda_inc_path)"-i./-I.. /.. /common/inc-o $ (configurationname)/example.obj example.cu
The output is modified to $ (configurationname)/example.obj
Dependency modification to Example.cu
PS: The compilation option here is for the convenience of many friends who have not yet supported the Cuda development of graphics cards. The compilation options used here are run on the emulator. If there is a real can run Cuda hardware support, you can modify the compilation options;
Here is the program to write your own example.cu.
D. Right click on the example item and choose the final compile option as EXE file.
E. Compile, execute, and you will see the emulator executing the program:
--------------------------------------------------------------------------------------------------------------- ------------------------------------
The simple environment is built. What each compilation option means, you can go to the http://www.nvidia.com/object/cuda_develop.html to download the relevant books