My OS is windows 7 64bit. I installed Microsoft C++ 2008 Express edition and Intel C++ Compiler v11.1 x86 version.
Now I could successfully compile x86 C code in Mathematica, e.g.
In[1]:= Needs["CCompilerDriver`"]
In[2]:= greeter = CreateExecutable[StringJoin["#include <stdio.h>\n", "int main(){\n", " printf(\"Hello world.\\n\");\n", "}\n"], "hiworld",
"Compiler" -> CCompilerDriver`IntelCompiler`IntelCompiler,
"CompilerInstallation" -> "C:\\Program Files (x86)\\Intel\\Compiler\\11.1\\072\\",
"CompilerName" -> Automatic, "TargetSystemID" -> "Windows"]
Out[2]= "C:\\...\\AppData\\Roaming\\Mathematica\\\
SystemFiles\\LibraryResources\\Windows-x86-64\\hiworld.exe"
But failed to use CompilationTarget -> "C"
to compile a function like this
In[3]:= f = Compile[{x, y}, Sqrt[x^2 + y^2], CompilationTarget -> "C"]
During evaluation of In[3]:= LibraryFunction::libload: The function compiledFunction5 was not loaded from the file C:\\...\AppData\Roaming\Mathematica\ApplicationData\CCompilerDriver\BuildFolder\vax-5844\compiledFunction5.dll. >>
During evaluation of In[3]:= Compile::nogen: A library could not be generated from the compiled function. >>
I guess I need to specify a default "TargetSystemID"-> "Windows"
since my platform is x64, but don't know how to setting such an option in Mathematica.
Did I miss any point here?
PS: I don't want to install Microsoft Visual Studio recently.