nvcc.exe链接错误找不到Microsoft Visual Studio配置文件'vcvars64.bat' [英] nvcc.exe linking error Microsoft Visual Studio configuration file 'vcvars64.bat' could not found

查看:5529
本文介绍了nvcc.exe链接错误找不到Microsoft Visual Studio配置文件'vcvars64.bat'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从Windows命令行使用 nvcc -ptx ,但我总是得到这个错误信息:
nvcc:fatal error:Microsoft Visual Studio配置文件找不到'vcvars64.bat'在'C:\Program Files(x86)\ Microsoft Visual S
tudio 11.0 \VC\bin /../..'

I want to use nvcc -ptx from windows command line, but I always get this error message: nvcc : fatal error : Microsoft Visual Studio configuration file 'vcvars64.bat' could not be found for installation at 'C:\Program Files (x86)\Microsoft Visual S tudio 11.0\VC\bin/../..'

我使用vs 2012 express版。可以解决什么问题?

I'm using vs 2012 express edition. What can be the solution?

推荐答案

我已经设法解决这个问题,并使用MS Visual Studio Express 2012,我做了:

I have managed to solve the issue and make work with MS Visual Studio Express 2012, here what I did:


  1. 安装了MS Visual Studio 2012 Express

  2. 安装了cuda_5.5.20_winvista_win7_win8_general_64,版本自2014-01-16

  3. 从此目录:C:\Program Files(x86)\Microsoft Visual Studio 11.0 \VC\bin,我已将x86_amd64复制到amd64

  4. 在新目录中:C:\Program Files(x86)\Microsoft Visual Studio 11.0 \VC\bin\amd64,我创建了一个文件vcvars64.bat

  5. 在文件vcvars64.bat中,刚刚添加:CALL setenv / x64

  1. Installed MS Visual Studio 2012 Express
  2. Installed cuda_5.5.20_winvista_win7_win8_general_64, the latest version as of 2014-01-16
  3. From this directory: C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin, I have copied x86_amd64 to amd64
  4. In the new directory: C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\amd64, I have created a file vcvars64.bat
  5. In the file vcvars64.bat, just added: CALL setenv /x64

工作得很好:

C:\CUDA> nvcc -o square square.cu
创建库square.lib和对象square.exp

C:\CUDA>nvcc -o square square.cu Creating library square.lib and object square.exp

C:\CUDA> square.exe
0.000000 1.000000 4.000000 9.000000
16.000000 25.000000 36.000000 49.000000
64.000000 81.000000 100.000000 121.000000
144.000000 169.000000 196.000000 225.000000

C:\CUDA>square.exe 0.000000 1.000000 4.000000 9.000000 16.000000 25.000000 36.000000 49.000000 64.000000 81.000000 100.000000 121.000000 144.000000 169.000000 196.000000 225.000000

这篇关于nvcc.exe链接错误找不到Microsoft Visual Studio配置文件'vcvars64.bat'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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