I installed Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1 Then, I installed Mathematica 10 trial version.
I did:
Needs["CCompilerDriver`"]
$CCompiler = {"Compiler" -> GenericCCompiler,
"CompilerInstallation" ->
"C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\bin",
"CompilerName" -> "cl.exe"};
Compile[{{x}}, x^2 + Sin[x^2], CompilationTarget -> "C"];
I got:
CreateLibrary::badcomp: Compiler specification "Compiler" -> GenericCCompiler does not specify a compiler driver listed by CCompilers[Full]. >>
Compile::nogen: A library could not be generated from the compiled function. >>
How can I set up c compiler which I installed for Mathematica?
$CCompiler
. If the Microsoft compiler is installed correctly, Mathematica will auto-detect it. Re-start Mathematica (including the front end) after installing the compiler. $\endgroup$$CCompiler
or not use it, I cannot compile for c compiler. I even restarted Windows but no success. $\endgroup$VS90COMNTOOLS
or similar. Can you check if it exists? EvaluateGetEnvironment[]
and look for it. $\endgroup$