I\'ve been searching extensively for a possible solution to my error for the past 2 weeks. I have successfully installed the Cuda 64-bit compiler (tools) and SDK as well as
UPDATE 06/04/2010:
Ok, I found the solution to the problem. The code is fine. After following the steps from the original link above and adding in the needed registry key make sure that Windows SDK is targeting the correct version (7.0) by launching the Windows SDK Configuration Tool from start menu, choose the right version (v7.0), and click "Make Current".
Make sure to include the following directories for x64 compiling (under "Tools->Options->Projects And Solutions->VC++ Directories): C:\CUDA\bin64 C:\CUDA\lib64 C:\CUDA\include C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64
Now there's one other thing to change for a 64-bit system. Apparently the cuda compiler has a "hard-coded" directory for 64-bit compilers on Visual Express 2008. To make the fix, copy the needed file "vcvars64.bat" and rename it to "vcvarsamd64.bat" as follows:
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat
to
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\vcvarsamd64.bat
Upon the change, the program compiled and ran successfully.
I've read 'other' postings all over the web for other solutions to the error: "nvcc fatal: Visual Studio configuration file '(null)'", but very few have specified the above as a requirement to get nvcc to find the necessary visual studio configuration file.
Disclaimer: I installed to a clean machine and OS.
Hopefully this helps others with similar problems.
Same error message, but different solution yet again. I was trying to compile 32 bits CUDA libs on a 64bits machine.
I had to add --machine 32
argument to nvcc
call, as suggested by Imperian in a comment, here : Error compiling CUDA from Command Prompt
in hope this helps someone
I solved the problem by
Note: I did this because:
I found that I also had to change the CUDA_PATH and CUDA_LIB_PATH environment variables, because they were pointing to the x86 toolchain (which I had installed after the x64 tools).
After some faffing around with some linker errors, I managed to build a x64 CUDA app!