Hello. I tried to compile the matrix multiplication example program using this instructions:
[b]
[i]The setup to create a new project, by hand, is not very easy, and i lost a lot of time trying to compile my first program with success.
This is a quick guide, from my personal experiences:
* Download & Install CUDA 2.1 & the CUDA SDK, from the nVidia site.
* Open VS 2008, and start a new C++ Win32 Console project.
* Right click in the name of the project in the solution explorer, and select 'Custom Build Rules'. A new window will open. Click on 'import' and select the file "C:\CUDA SDK\common\CUDA.rules". Then mark the checkbox for the CUDA files.
* Rename the main .cpp file to .cu
* Right click on the .cu file and select 'properties'. Select 'CUDA Build Rule 2.1.0' in General - Tool.
* Open the properties of the project, and change:
C++
General
o Additional include directories: $(CUDA_INC_PATH);$(NVSDKCUDA_ROOT)\common\inc
o Debug Information Format: Program Database (/Zi)
Code Generation
o Runtime Library: Multi-threaded Debug (/MTd)
Linker
General
o Enable incremental linkin: No (/INCREMENTAL:NO)
o Additional Library Directories: $(CUDA_LIB_PATH);$(NVSDKCUDA_ROOT)\common\lib
Input
o Additional Dependencies: cudart.lib cutil32D.lib
Optimization
o Enable COMDAT folding: Do Not Remove Redundant COMDATs (/OPT:NOICF)
Then, edit your .cu file, and put your kernel there.[/i][/b]
But I don’t get how am I supposed to do the last part (“Then, edit your .cu file, and put your kernel there.”).
Also, when I try to build it, I get this message:
1>LINK : fatal error LNK1181: cannot open input file ‘cudart.lib’
I have a graphics card GeForce 8600M GT in a notebook dell inspiron 1520 and recently installed CUDA SDK 2.2, CUDA Toolkit SDK and the nVIDIA driver “185.85_notebook_winxp_32bit_whql.exe”. I am also trying to integrate CUDA but with Visual Studio 2005 C++. I still do not achieve it manually, but there are a few hints that you might like to follow:
Go to http://forums.nvidia.com/index.php?showtopic=65111 and download the project wizard offered by kyzhao to integrate CUDA with VS2005. Intall it and then create this already-configured project and replace the existing code with your code. I have tested it and it works well.