how do i integrate cuda 2.3 into visual C++

i installed the driver, toolkit and the sdk, in that order

typing nvcc -V in the command prompt gives the correct response
i can run the sample executable files that come with the SDK
however, i can not compile any of the example programs in visual C++

using cuda 2.3 (64 bit version of the driver, toolkit and sdk)
visual C++ express edition

windows 7 professional edition 64 bit
Nvidia geforce 9400m g
core 2 duo 2.1 ghz
3 gb ram

i think i installed everything into their default directories.
i read something about goign into tools → options → projects and solutions → VC++ directories and adding include and library files and that is also not working.
what files exactly do i need to include?

I have also run CUDA_VS_Wizard_W32.2.0 with no success

my build log for when i try to compile matrixMul_vc90 (a sample program that came with the SDK) is attached first
my build log for compiling the sample cuda program that came with the CUDA VS WIZARD template is attached second

please help!
BuildLog.htm (11.1 KB)
BuildLog.htm (8.78 KB)

what’s your version of visual studio?

are you sure that cl.exe locates at directory C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin ?

oh do i need visual studio?

i use visual c++ 2008 express edition.

and yes cl.exe is in the correct directory

from your logfile, Output Window shows

[codebox]Compiling with CUDA Build Rule…

“C:\CUDA\bin64\nvcc.exe” -arch sm_10 -ccbin “C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin” -Xcompiler “/EHsc /W3 /nologo /O2 /Zi /MT " -I"C:\CUDA\include” -I"…/…/common/inc" -maxrregcount=32 --compile -o “Release\matrixMul.cu.obj” “c:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK\C\src\matrixMul\matrixMul.cu”

nvcc fatal : Visual Studio configuration file ‘(null)’ could not be found for installation at ‘C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/…/…’

Linking…

LINK : fatal error LNK1181: cannot open input file ‘.\Release\matrixMul.cu.obj’

[/codebox]

this means that nvcc.exe does not find cl.exe from directory “C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin”, so

it cannot compile matrixMul.cu, then no matrixMul.cu.obj, finally linker cannot find object file ‘.\Release\matrixMul.cu.obj’

I use visual studio 2005, then in my logfile, output window shows

[codebox]Compiling with CUDA Build Rule…

“C:\CUDA\bin64\nvcc.exe” -arch sm_10 -ccbin “C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin” -Xcompiler “/EHsc /W3 /nologo /O2 /Zi /MT " -I"C:\CUDA\include” -I"…/…/common/inc" -maxrregcount=32 --compile -o “x64\Release\matrixMul.cu.obj” “c:\Documents and Settings\All Users\Application Data\NVIDIA Corporation\NVIDIA CUDA SDK\C\src\matrixMul\matrixMul.cu”

matrixMul.cu

tmpxft_000004c8_00000000-3_matrixMul.cudafe1.gpu

tmpxft_000004c8_00000000-8_matrixMul.cudafe2.gpu

tmpxft_000004c8_00000000-3_matrixMul.cudafe1.cpp

tmpxft_000004c8_00000000-12_matrixMul.ii

Compiling…

matrixMul_gold.cpp

Linking…

Embedding manifest…

Performing Post-Build Event…

[/codebox]

But you say "cl.exe exists in directory “C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin” , this is strange