1
我試圖如何爲Mathematica for Windows設置Intel C++ 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
答案是:安裝C編譯器! – Artes 2012-01-18 18:19:29
@我做過的藝術。我安裝了英特爾C++ Composer XE 2011 SP1,這是舊版英特爾C++編譯器的升級。但看起來MMA不承認它。 – 2012-01-19 02:27:24