来源:http://hypergroups.github.io/Mathematica%E8%AE%BE%E7%BD%AEC%E7%BC%96%E8%AF%91%E5%99%A8/
因为Mathematica某一版本推出后,使用的是当时的其他产品的信息,比如JDK等,比如9.0只识别到VC2010
Needs["CCompilerDriver`"]
若装了VC2012,不加选项的使用就没有编译器了。
CCompilers[]
查看选项指定的设置
CCompilers[Full]
设置新编译器
$CCompiler = {"Name" -> "Visual Studio",
"Compiler" ->
CCompilerDriver`VisualStudioCompiler`VisualStudioCompiler,
"CompilerInstallation" ->
"E:\\Program Files (x86)\\Microsoft Visual Studio 11.0"}
"Compiler"→CCompilerDriver`VisualStudioCompiler`VisualStudioCompiler
这个要怎么知道呢?如果你以前装过Mathematica能识别的版本的号,有文档里有这个就能复制过来,我自己也忘记了,后来打开一个旧的nb文档复制过来。
因为之前在有个论坛发过一个攻略,就上去查看了一下。
记住就是记一个关键词VisualStudio
$CCompiler
Welcome to comment,click to go to my homepage.