如何设置 Intel C++适用于 Windows 的 Mathematica Composer XE?
我尝试过
Needs["CCompilerDriver`IntelCompiler`"]
greeter = CreateExecutable[StringJoin["#include <stdio.h>\n", "int main(){\n", " printf(\"Hello world.\\n\");\n", "}\n"], "hiworld", "Compiler" -> IntelCompiler, "CompilerInstallation" -> "C:\\Program Files (x86)\\Intel\\Composer XE 2011 SP1\\bin\\ia32", "CompilerName" -> "icl.exe"]
,但出现错误:
CreateExecutable::instl: The compiler installation directive "CompilerInstallation" -> C:\Program Files (x86)\Intel\Composer XE 2011 SP1\bin\ia32 does not indicate a usable installation of Intel Compiler. >>
编辑:
In[776]:= CCompilers[Full]
Out[776]= {{"Name" -> "Intel Compiler", "Compiler" -> IntelCompiler, "CompilerInstallation" -> None, "CompilerName" -> Automatic}, {"Name" -> "Generic C Compiler", "Compiler" -> CompilerDriver`GenericCCompiler`GenericCCompiler, "CompilerInstallation" -> None, "CompilerName" -> Automatic}}
In[777]:= CCompilers[]
Out[777]= {}
即使在我指定了编译器的位置后,MMA 似乎也没有找到编译器。
我在这里错过了什么要点吗?
http://reference.wolfram.com/mathematica/CCompilerDriver/tutorial/SpecificCompilers .html#394172820
I tried
Needs["CCompilerDriver`IntelCompiler`"]
greeter = CreateExecutable[StringJoin["#include <stdio.h>\n", "int main(){\n", " printf(\"Hello world.\\n\");\n", "}\n"], "hiworld", "Compiler" -> IntelCompiler, "CompilerInstallation" -> "C:\\Program Files (x86)\\Intel\\Composer XE 2011 SP1\\bin\\ia32", "CompilerName" -> "icl.exe"]
But get an error:
CreateExecutable::instl: The compiler installation directive "CompilerInstallation" -> C:\Program Files (x86)\Intel\Composer XE 2011 SP1\bin\ia32 does not indicate a usable installation of Intel Compiler. >>
EDIT:
In[776]:= CCompilers[Full]
Out[776]= {{"Name" -> "Intel Compiler", "Compiler" -> IntelCompiler, "CompilerInstallation" -> None, "CompilerName" -> Automatic}, {"Name" -> "Generic C Compiler", "Compiler" -> CompilerDriver`GenericCCompiler`GenericCCompiler, "CompilerInstallation" -> None, "CompilerName" -> Automatic}}
In[777]:= CCompilers[]
Out[777]= {}
It seems MMA didn't find the compiler even after I specified its location.
Did I miss any point here?
http://reference.wolfram.com/mathematica/CCompilerDriver/tutorial/SpecificCompilers.html#394172820
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先
检查您是否安装了
IntelCompiler
:就我而言,我得到类似这样的信息:
并评估您的输入
greeter=...
错误消息就像您的情况一样。
相反,从
CCompilers[Full]
正确安装的输出中复制我得到了该可执行文件。
Starting with
check if you have installed
IntelCompiler
:in my case I get something like this :
and evaluating your input
greeter=...
the error message is like in your case.
Instead, copying from the output of
CCompilers[Full]
proper installationI get that executable.