c++ - VS在编译CUDA命令行时生成不可识别的字符
迷茫
迷茫 2017-04-17 14:33:02
0
0
684

我用的是CUDA 7.0 和VS 2013。编译模版程序时生成这个错误:

1> Compiling CUDA source file kernel.cu... 1> 1> C:\>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.0\bin\nvcc.exe" -gencode=arch=compute_20,code=\"sm_20,compute_20\" --use-local-env --cl-version 2013 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.0\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.0\include" -G --keep-dir Debug -maxrregcount=0 --machine 32 --compile -cudart static /FS -g -DWIN32 -D_DEBUG -D_CONSOLE -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /Zi /RTC1 /MDd /FS" -o Debug\kernel.cu.obj "C:\CUDA\test\test\kernel.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)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\CUDA 7.0.targets(593,9): error MSB3721: The command “"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.0\bin\nvcc.exe" -gencode=arch=compute_20,code=\"sm_20,compute_20\" --use-local-env --cl-version 2013 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.0\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.0\include" -G --keep-dir Debug -maxrregcount=0 --machine 32 --compile -cudart static /FS -g -DWIN32 -D_DEBUG -D_CONSOLE -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /Zi /RTC1 /MDd /FS" -o Debug\kernel.cu.obj "C:\CUDA\test\test\kernel.cu"” exited with code 1.

参考这个帖子 nvcc fatal : A single input file is required for a non-link phase when an output file is specified,应该是生成的/EHsc /W3 /nologo /Od /Zi /RTC1 /MDd /FS是错误的,那应该怎么避免这个问题?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

membalas semua (0)
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan
Tentang kita Penafian Sitemap
Laman web PHP Cina:Latihan PHP dalam talian kebajikan awam,Bantu pelajar PHP berkembang dengan cepat!