从命令提示符编译CUDA时出错 [英] Error compiling CUDA from Command Prompt

查看:191
本文介绍了从命令提示符编译CUDA时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过命令提示符在Windows 7上编译cuda测试程序
我是这个命令:

I'm trying to compile a cuda test program on Windows 7 via Command Prompt, I'm this command:

nvcc test.cu

但是我得到的是这个错误:

But all I get is this error:

nvcc fatal : Cannot find compiler 'cl.exe' in PATH

可能是什么原因导致此错误?

What may be causing this error?

推荐答案

包含cl.exe文件到您的路径环境变量。例如:

You will need to add the folder containing the "cl.exe" file to your path environment variable. For example:

C:\Program Files\Microsoft Visual Studio 10.0\VC\bin

编辑:确定,转至我的电脑 - >属性 - >高级系统设置 - >环境变量。这里在列表中查找PATH,并添加上面的路径(或任何是您的cl.exe的位置)。

Edit: Ok, go to My Computer -> Properties -> Advanced System Settings -> Environment Variables. Here look for "PATH" in the list, and add the path above (or whatever is the location of your cl.exe).

这篇关于从命令提示符编译CUDA时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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