Visual Studio 2017中的nvcc错误::指定输出文件时,非链接阶段需要单个输入文件

时间:2019-07-06 03:10:09

标签: visual-studio cuda nvcc

我试图将cuda代码添加到使用Visual Studio创建的现有应用程序中,但是当我尝试编译代码时,出现错误消息“ nvcc致命错误:非链接阶段需要单个输入文件当指定了输出文件时“”,以下是整个构建输出以供参考。

C:\Users\Shubham Sachdeva\Desktop\Simplex_2178\Cuda Boids>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe" -gencode=arch=compute_35,code=\"sm_35,compute_35\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86" -x cu  -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -I"C:\Users\Shubham Sachdeva\Desktop\Simplex_2178\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include"  -G   --keep-dir Debug -maxrregcount=0  --machine 32 --compile -cudart static  -g   -DDEBUG -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /Fd"C:\Users\Shubham Sachdeva\Desktop\Simplex_2178\Z_DELETE\Cuda_Boids\Debug\vc141.pdb" /FS /Zi /RTC1 /MDd " -o "C:\Users\Shubham Sachdeva\Desktop\Simplex_2178\Z_DELETE\Cuda_Boids\Debug\Boids.cu.obj" "C:\Users\Shubham Sachdeva\Desktop\Simplex_2178\Cuda Boids\Boids.cu"

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

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\BuildCustomizations\CUDA 10.1.targets(762,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe" -gencode=arch=compute_35,code=\"sm_35,compute_35\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86" -x cu  -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -I"C:\Users\Shubham Sachdeva\Desktop\Simplex_2178\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include"  -G   --keep-dir Debug -maxrregcount=0  --machine 32 --compile -cudart static  -g   -DDEBUG -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /Fd"C:\Users\Shubham Sachdeva\Desktop\Simplex_2178\Z_DELETE\Cuda_Boids\Debug\vc141.pdb" /FS /Zi /RTC1 /MDd " -o "C:\Users\Shubham Sachdeva\Desktop\Simplex_2178\Z_DELETE\Cuda_Boids\Debug\Boids.cu.obj" "C:\Users\Shubham Sachdeva\Desktop\Simplex_2178\Cuda Boids\Boids.cu"" exited with code 1.

0 个答案:

没有答案