I have windows 8, Mathematica 9, and I've just installed Microsoft Visual Studio 2013 with update 3.
I'm try to run Compile with the option CompilationTarget->"C".
Needs["CCompilerDriver`"];
In[60]:= CCompilers[]
Out[60]= {{"Name" -> "Visual Studio",
"Compiler" ->
CCompilerDriver`VisualStudioCompiler`VisualStudioCompiler,
"CompilerInstallation" ->
"C:\\Program Files (x86)\\Microsoft Visual Studio 11.0",
"CompilerName" -> Automatic}}
But when trying to run an example of Mathematica Help I get:
In[61]:= cGen =
Compile[{{x}}, x^2 + Sin[x^2], CompilationTarget -> "C"]
During evaluation of In[61]:= Compile::nogen: A library could not be generated from the compiled function. >>
The Mathematica help doesn't have information on how to solve this. This error appears always when I try to use Compile with CompilationTarget option...
Any help would be appreciated.
It says if the create library command fails I do not have a suitable compiler... How can it be, if I downloaded Microsoft Visual Studio 2013 with update 3 (MVS)? Unless I had to set up mathematica compiler in specific way. I just installed the MVS, and Mathematica seemed to detect it.
– An old man in the sea. Oct 22 '14 at 21:05Needs["CCompilerDriver"]and then runCCompilers[]to get the information about your CCompiler setup. Your MVS Compiler should show up there. If it does not you might be able to fix the problem by manually setting the$CCompilervariable like$CCompiler = {"Name"->"Visual Studio", "Compiler"->CCompilerDriverVisualStudioCompilerVisualStudioCompiler, "CompilerInstallation"->"C:\Program Files (x86)\Microsoft Visual Studio 10.0", "CompilerName"->Automatic}` – Wizard Oct 23 '14 at 10:53Microsoft Visual Studio 11.0? You have version 2013 installed, that would beMicrosoft Visual Studio 12.0. So the setup is definitely not right. Try setting it manually via$CCompilervariable. – Wizard Oct 23 '14 at 11:19