CUDA Compilation Issues

Today I downloaded and installed the the 190.38_general driver, the 2.3 toolkit, and the 2.3 2.3 SDK. My PC has a Quadro FX 1800 and Tesla C1060 in it. I can run the examples from the SDK just fine, but when I try to compile them myself I get link errors in VS9.0 such as:

1>------ Build started: Project: convolutionFFT2D, Configuration: Debug Win32 ------
1>Compiling with CUDA Build Rule…
1>“C:\CUDA\bin64\nvcc.exe” -arch sm_10 -ccbin “C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin” -Xcompiler “/EHsc /W3 /nologo /Od /Zi /MTd " -I"C:\CUDA\include” -I"…/…/common/inc" -maxrregcount=32 --compile -o “Debug\convolutionFFT2D.cu.obj” “c:\Documents and Settings\All Users\Application Data\NVIDIA Corporation\NVIDIA GPU Computing SDK\C\src\convolutionFFT2D\convolutionFFT2D.cu”
1>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/…/…’
1>Linking…
1>LINK : fatal error LNK1181: cannot open input file ‘.\Debug\convolutionFFT2D.cu.obj’

When I look in the folder containing cl.exe there is a config file called cl.exe.config. I’m not a cpp programmer so these errors don’t mean much to me. I downloaded the lasted CUDA.net 2.3.5 and it has the same issue when running nvcc with the listed parameters (running from the console does as well). This is the second error I got since I fixed the first one which was adding the pat of the cl.exe file to the PATH system variable. Anyone have any advice on how to fix this? Thanks

I think that cl.exe.config plays no role.

what’s your content in command line of “CUDA Build Rule v2.3.0”?

project --> convolutionFFT2D property --> CUDA Build Rule v2.3.0 --> command line

I had a similar issue when I started programming with CUDA. The mistake I was making was with using the standard windows command window to run the nvcc compiler. The nvcc compiler doesn’t link with the cl.exe file when using windows command prompt. Instead, Visual Studio supplies it’s own command prompt that can either be launched from the VS text editor or from the start menu folder. I don’t know much about the difference in the two command prompts but apparently the VS command prompt automatically links the NVCC compiler with the VS compiler. Try to compile to code with the VS Command Prompt and you might have more luck.

If this doesn’t work, you can also try running vcvars.bat. This is a batch file located at C:\Program Files\Microsoft Visual Studio 9.0\VC\bin that helps setup environment variables.

The command prompt issue was a something that confused me quite a bit when I started using CUDA and took me a while to resolve (by accidentally finding a VS command prompt existed and trying it out of curiosity). The documentation provided by NVIDIA didn’t clearly address this issue when using VS to do coding (unless I overlooked it). If there are any NVIDIA people reading this I would recommend updating the documentation and walking new users through this step to make transition easier for us non-CS people.