I have been trying to add a .cu file into my own(dll) win32 project and compile it, using VS2008 on Windows7. I was able to compile a .cu in the cppIntegration sample project, but in my project I was having issues.
At first, I got the error "Don't know what to do with "Toolkit...". It seems nvcc was having issues with the fact that the toolkit has spaces in it's path. When renaming the NVIDIA tool kit folder to have no spaces, I got the same error but now it said the same starting from "Files", which is part of the "Program files" folder which also have a space.
Do notice that in the cppIntegration it worked properly, eventhough it had the exact same path. So I SymbLink the toolkit path, and now I got a different error when compiling the .cu file in my project(but not in cppIntegration). "Could not find the specified path". I assume this refers to the same path I just SymbLinked.
I believe I need to change something in the project properties. Maybe the fact I am building a dll is causing the problem. Maybe it has to do something with a 64bit version of CUDA while I do win32 in 32 bit(perhaps?).
Thank you.
Update
This is the output when I compile in VS2008.
Compiling with CUDA Build Rule... 1>"\MyCUDA\CUDA\v3.2\\bin\nvcc.exe"
-gencode=arch=compute_10,code=\"sm_10,compute_10\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" --machine 32 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin" -Xcompiler "/EHsc /W3 /nologo /O2 /Zi /MT " -I"\MyCUDA\CUDA\v3.2\include" -maxrregcount=32 --compile -o ".\Intermediate\Release/Decoder.cu.obj" Decoder.cu
1>The system cannot find the path specified.
1>Project : error PRJ0019: A tool returned an error code from "Compiling with CUDA Build Rule..."
This is the compilation for cppIntegration:
"\MyCUDA\CUDA\v3.2\bin\nvcc.exe"
-gencode=arch=compute_10,code=\"sm_10,compute_10\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" --machine 32 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin" -Xcompiler "/EHsc /W3 /nologo /O2 /Zi /MT " -I"\MyCUDA\CUDA\v3.2\include" -maxrregcount=32 --compile -o "Release/cppIntegration.cu.obj" cppIntegration.cu