CudafyModule km = CudafyTranslator.Cudafy();导致错误,找不到编译器 [英] CudafyModule km = CudafyTranslator.Cudafy(); causing an error, can't find compiler

查看:108
本文介绍了CudafyModule km = CudafyTranslator.Cudafy();导致错误,找不到编译器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行我的第一个cudafy项目,但在以下行上出现以下错误:

I'm trying to run my 1st cudafy project but I'm getting the following error on the following line:

CudafyModule km = CudafyTranslator.Cudafy();

下面是我收到的确切错误消息的屏幕截图.

Below is a screenshot of the exact error message I'm getting.

我已经运行了Cudafy附带的示例项目,并且它们运行良好,所以我不明白为什么它说找不到编译器.我已经将Cudafy.net添加到了引用中,请参见下面的屏幕快照,所有信息都与示例项目完全相同,位于图像的右侧,并且可以正常工作.

I've run the example projects which come with Cudafy and they run fine so I don't understand why its saying it can't find the compiler. I've added the Cudafy.net to the references, see screenshot below, and all the info is exactly the same as the example projects, on the right hand side of the image, and that works.

有人有什么想法吗?

编辑

看来在SO上已经解决了类似的问题,但是我不知道他指的是路径环境变量在哪里.

It appears a similar issue has been answered on SO already but I don't understand where the path environment variable is that he is referring to.

类似SO问题

编辑2

以下是我发现的以下cl.exe.我不确定该使用哪一个.我正在运行英特尔处理器,因此我倾向于最底层的处理器,但这只是一个猜测.

Below are the following cl.exe I found. I'm not sure which one to use though. I'm running an Intel processor so I'm leaning towards the bottom one but that's just a guess.

推荐答案

很高兴听到它为您解决了.这是答案表格中的评论... 链接的SO答案是指系统PATH.在Windows 7中,您可以通过以下方式进行设置:

Glad to hear it worked out for you. Here's the comments in answer form... The linked SO answer is referring to the system PATH. In Windows 7 you can set it through:

  1. 右键单击我的电脑"图标
  2. 从上下文菜单中选择属性
  3. 点击高级"标签
  4. 点击环境变量按钮
  5. 单击名为"Path"的变量,然后单击编辑"并输入cl.exe的路径

对于选择正确的cl.exe,如果您使用的是非Itanium Intel处理器(即x86),则需要x86_amd64

As for choosing the correct cl.exe, if you're on a non-itanium intel processor (i.e. x86) you'll want x86_amd64

这篇关于CudafyModule km = CudafyTranslator.Cudafy();导致错误,找不到编译器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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