如何设置nvcc使用Visual C ++ Express 2010 x64从Windows SDK 7.1? [英] How can I setup nvcc to use Visual C++ Express 2010 x64 from Windows SDK 7.1?

查看:186
本文介绍了如何设置nvcc使用Visual C ++ Express 2010 x64从Windows SDK 7.1?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual C ++ Express 2010扩展的Windows SDK 7.1(添加64位编译器)构建64位应用程序。当我在32位模式使用nvcc它工作得很好。当我使用它在64位模式下,我得到这个错误:

I'm building 64-bit apps with Visual C++ Express 2010 extended with Windows SDK 7.1 (to add 64 bit compiler). When I use nvcc in 32-bits mode it works well. When I use it in 64-bits mode I get this error:

nvcc fatal   : Visual Studio configuration file '(null)' could not be found for installation at 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64/../../..'

我可以怎么做才能向nvcc提供正确的文件?

What can I do to supply the correct files to nvcc?

推荐答案

好的,我找到了解决方案。 Nvcc正在寻找vcvars64.bat文件在程序文件\Microsoft Visual Studio 10.0 \VC\bin\amd64 ,但它只存在于专业版本VS.您必须手动创建它:

CALL setenv / x64

Ok, I've found solution. Nvcc is looking for vcvars64.bat file to be in Program Files\Microsoft Visual Studio 10.0\VC\bin\amd64, but it exists only in professional version of VS. You have to create it manually putting inside:
CALL setenv /x64

这篇关于如何设置nvcc使用Visual C ++ Express 2010 x64从Windows SDK 7.1?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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