Hello. I tried to compile the matrix multiplication example program using this instructions:
[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’m using CUDA2.1 and VS2008 on Windows XP SP2.