How to Configure CUDA 4.0 on Visual Studio 2010 in Windows XP
Steps to configure CUDA 4.0 in Visual Studio 2010

[b]Install Visual Studio 2010.[/b]

Download the following from NVIDIA site and install them all

"http://developer.nvidia.com/cuda-toolkit-40"

[b]Developer Drivers for WinXP[/b] 32bit

[b]CUDA Toolkit[/b] 32bit

*NEW* [b]CUDA Toolkit 4.0 Build Customization BUG FIX Update[/b]
Fixes error message "$(CUDABuildTasksPath) property is not valid"

[b]GPU Computing SDK[/b] - complete package including all code samples

Install all of the above in the order.


Now open Visual Studio 2010,

[b]New [/b] -> [b]Project[/b] -> [b]Win32 Console Application[/b]

[b]Name:[/b] "HelloCuda" -> [b]OK[/b] -> [b]Next[/b] -> [b]Empty project[/b] -> [b]Finish[/b]

Right Click the project [b]HelloCuda[/b] -> Build Customizations

Click [b]Find Existing[/b] 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 [b].cu[/b] Extension

Now you will have a file [b]HelloWorld.cu[/b]

Add this file to the project HelloCuda

Right Click HelloWorld.cu -> [b]Configuration Properties[/b] -> [b]General [/b]-> [b]Item Type[/b] -> [b]CUDA C/C++[/b]

Now right click project HelloCuda -> [b]Configuration Properties[/b] -> [b]CUDA C/C++ [/b] -> [b]Common[/b] -> [b]Additional Include Directories[/b]

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 -> [b]Configuration Properties[/b] -> [b]Linker [/b] -> [b]General[/b] -> [b]Additional Library Directories[/b]

Add D:\Documents and Settings\All Users\Application Data\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0\C\common\lib;

[b]Linker[/b] -> [b]Input[/b] -> [b]Additional Dependencies [/b] -> [b]cudart.lib[/b]

Now write a sample CUDA C Program inside HelloWorld.cu and Compile.


You are all done.
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.

#1
Posted 11/26/2011 04:32 PM   
Hello!
I have done this intstuction step by step
but now i have strange messages from compiler
(i have a russian version of VS2010)
when compiling this:

[code]#include "stdio.h"
int main()
{
int dC;
cudaGetDeviceCount(&dC);
printf("%d\n",dC);
return 0;
}[/code]
there is given message:
c1xx : fatal error C1083: ═х єфрхЄё  юЄъЁ√Є№ Їрщы шёЄюўэшъ: C:/Users/??????/Documents/Visual Studio 2005/Projects/HellCuda/HellCuda/int.cu: Invalid argument
"═х єфрхЄё юЄъЁ√Є№ Їрщы шёЄюўэшъ" is meaningless set of symbols, and error C1083 happend when compiler cannot open include file

what could be the problem?
Hello!

I have done this intstuction step by step

but now i have strange messages from compiler

(i have a russian version of VS2010)

when compiling this:



#include "stdio.h"

int main()

{

int dC;

cudaGetDeviceCount(&dC);

printf("%d\n",dC);

return 0;

}


there is given message:

c1xx : fatal error C1083: ═х єфрхЄё  юЄъЁ√Є№ Їрщы шёЄюўэшъ: C:/Users/??????/Documents/Visual Studio 2005/Projects/HellCuda/HellCuda/int.cu: Invalid argument

"═х єфрхЄё юЄъЁ√Є№ Їрщы шёЄюўэшъ" is meaningless set of symbols, and error C1083 happend when compiler cannot open include file



what could be the problem?

#2
Posted 02/08/2012 04:42 PM   
Scroll To Top