Fatal: A single input file is required for a non-link phase when an outputfile is specified

I am using Visual Studio 2010 on windows 7. When compiling my project, I got this error message:

nvcc fatal : A single input file is required for a non-link phase when an outputfile is specified.

Here is the actual compiling command line generated by visual studio:

“C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.2\bin\nvcc.exe” -ccbin “C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin” -c -DWIN32 -D_CONSOLE -D_MBCS -DCUDA_SIFTGPU_ENABLED -Xcompiler /EHsc,/W3,/nologo,/O2,/Zi,/MTd -m 64 -I “C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.2\include” -I./ -I…/…/Include -o Debug_CUDA_x64\.obj C:\Users\helloworld\Documents\Visual Studio 2010\Projects\SiftGPU-V400\src\SiftGPU\ProgramCU.cu

Could anyone help figure out why I got the fatal message? I did not see anything wrong from the command.

Thanks.

The full path for the source file contains spaces. This makes it look as if there are multiple source files specified, since white space acts as a separator. Try enclosing all path names that contain spaces in double quotes (just like you did for the executable). This applies to spource as well as object files.

1 Like