使用Windows SDK 7.1和VC ++ 2010 Express编译64位CUDA [英] Compiling 64-bit CUDA using Windows SDK 7.1 and VC++ 2010 Express

查看:59
本文介绍了使用Windows SDK 7.1和VC ++ 2010 Express编译64位CUDA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法使用Visual C ++ 2010 Express编译CUDA。 我正在使用:


- CUDA 4.0(64位)


- Windows SDK 7.1


- Windows 7


我相信我已经正确设置了64位编译。  我正在尝试编译CUDA 4.0提供的一个CUDA示例。 我得到的错误是:


nvcc致命   :' - ccbin':预期数字


它尝试执行的命令行是:


C:\Documents and Settings \所有用户\ NVIDIA Corporation \ NVIDIA GPU计算SDK 4.0 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ nvcc.exe" -gencode =拱= compute_10,代码= \" sm_10,compute_10\" -gencode =拱= compute_20,代码= \" sm_20,compute_20\"
--use-local-env --cl-version  -ccbin" c:\Program Files(x86)\ Microsoft Visual Studio 10.0\VC\bin\ x86_amd64" -I" ./& QUOT; -I" ../../公共/ INC" -I" ../../../共享/ INC" -I"C:\Program Files \NVIDIA GPU Computing Toolkit \ COPA\v4.0 \ include"    --keep-dir
" x64 \ Release" -maxrregcount = 32  --machine 64 --compile      -Xcompiler" / EHsc / nologo / Od / Zi  / MD" -o"x64 / Release / bandwidthTest.cu.obj" "C:\Documents and Settings \All Users\NVIDIA Corporation \ NVIDIA GPU Computing SDK 4.0 \\\\\\\\\\\\\\\\\\\\\\\\关键问题在于标志--cl-version之后没有参数,所以我猜它将下一个标志(ccbin)解释为参数。 请注意,我将平台工具集设置为Windows7.1SDK。 如果我应该更改为,比如v90,那么标志
确实有一个参数,即--cl-version 2008


任何想法为什么这个标志没有得到一个论证,以及我能做些什么让它发挥作用?


 

解决方案

这个问题比较好接受了nvidia。 nvcc应用程序不是VC应用程序,并且从命令行它属于nvidia。


I'm having trouble getting CUDA to compile using Visual C++ 2010 Express.  I am using:

- CUDA 4.0 (64 bit)

- Windows SDK 7.1

- Windows 7

I believe I have everything correctly set for compiling 64 bit.   I'm trying to compile one of the CUDA examples provided with CUDA 4.0.  The error I get is:

nvcc fatal   : '-ccbin': expected a number

The command line that it tries to execute is:

C:\Documents and Settings\All Users\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0\C\src\bandwidthTest>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\bin\nvcc.exe" -gencode=arch=compute_10,code=\"sm_10,compute_10\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" --use-local-env --cl-version  -ccbin "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64" -I"./" -I"../../common/inc" -I"../../../shared/inc" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include"    --keep-dir "x64\Release" -maxrregcount=32  --machine 64 --compile      -Xcompiler "/EHsc /nologo /Od /Zi  /MD " -o "x64/Release/bandwidthTest.cu.obj" "C:\Documents and Settings\All Users\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0\C\src\bandwidthTest\bandwidthTest.cu"

The key issue lies in that the flag --cl-version has no argument after it, so I guess it interprets the next flag (ccbin) as the argument.  Note that I have Platform Toolset set to Windows7.1SDK.  If I should change this to, say v90, then the flag does have an argument, i.e., --cl-version 2008

Any idea why this flag is not getting an argument, and what I can do to make it work?

 

解决方案

This issue is better taken up with nvidia. The nvcc application is not a VC application and from the command line it belongs to nvidia.


这篇关于使用Windows SDK 7.1和VC ++ 2010 Express编译64位CUDA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆