请教:CUDA程序出现错误nvcc fatal: Could not open input file
一分之千 2010-12-21 10:26:21 出现如下错误
"C:\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 "D:\Program Files\Microsoft Visual Studio 9.0\VC\bin" -Xcompiler "/EHsc /W3 /nologo /O2 /Zi /MT " -I"C:\CUDA\v3.2\\include" -maxrregcount=32 --compile -o "Debug/vector_gpu.cu.obj" vector_gpu.cu
1>nvcc fatal : Could not open input file C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/tmpxft_000013cc_00000000-1
首先是从网上现在的一个cuda程序,运行后出现这个错误,以为是程序问题,自己新建一个也是这样,不管是使用向导还是手动添加都是如此。
请大家帮下忙!
网上也查了一下,以下方法都试过,没有用:
1)
In c:program files/microsoft visual studio 9.0\common7\tools\vsvars32.bat put perentacies on variables
I changed the lines around 13 to:
@if not "%WindowsSdkDir%" == "" (
set 'PATH="%WindowsSdkDir%"bin;%PATH%'
set 'INCLUDE="%WindowsSdkDir%"include;%INCLUDE%'
set 'LIB="%WindowsSdkDir%"lib;%LIB%'
)
2)
replacing the environmental varialble "TEMP=%USERPROFILE%\Local Settings\Temp" by "TEMP=%SystemRoot%\TEMP".
3)
Just as a quick note - what worked for me was to remove all quotation marks from the PATH environment variable.
等待高人出现!!!!!! 万分感谢