Mathematica does not recognize any C compiler on my computer. I run Mathematica 8.0.4.0 on Windows 7. I've tried to make sure various C compilers are installed on my computer, but I'm not sure how to get Mathematica to recognize the installation.
If the compiler is installed correctly, should Mathematica automatically recognize it, or do I have to point Mathematica to a very specific folder to find it?
I edited this post according to some of the comments below by @Szabolcs and @. I've been through https://stackoverflow.com/a/6549505/695132 , and step 2 appears to fail.
I've already been to http://forums.wolfram.com/mathgroup/archive/2011/Nov/msg00024.html, and I installed Microsoft Windows SDK v7.1 for Windows 7 and .NET Framework 4 for xI64. http://www.microsoft.com/en-us/download/details.aspx?id=8442
I also got the Microsoft Visual C++ 2010 Service Pack 1 Compiler Update for the Windows SDK 7.1: http://www.microsoft.com/download/en/details.aspx?id=4422
Please forgive me for not knowing how to check to see if the compiler is working. I simply don't even know where to start with Visual Studios and all that.
Needs["CCompilerDriver`"]
DefaultCCompiler[]
CCompilers[Full]
CCompilers[]
gives the following output:
$Failed
{}
{{"Name" -> "Intel Compiler",
"Compiler" -> CCompilerDriver`IntelCompiler`IntelCompiler,
"CompilerInstallation" -> None,
"CompilerName" -> Automatic}, {"Name" -> "Generic C Compiler",
"Compiler" -> CCompilerDriver`GenericCCompiler`GenericCCompiler,
"CompilerInstallation" -> None, "CompilerName" -> Automatic}}
I get the following error when I try to compile:
CreateLibrary::instl: The compiler installation directive "CompilerInstallation" -> C:\Program Files (x86)\Microsoft Visual Studio 10.0\SDK does not indicate a usable installation of Visual Studio. >>
My question is similar to this question thread, but I don't have enough reputation to ask on that thread. https://stackoverflow.com/questions/6537457/gcc-installed-mathematica-still-wont-compile-to-c
I also have "gcc" show up in a search in various folders under Python27 and MinGW, but Mathematica doesn't seem to know about it. I don't care which compiler I use; I just want an easy installation.
I spent a day trying all sorts of stuff mentioned on various forums, but nothing is working. Why does Mathematica not come out of the box with a working compiler?
Needs["CCompilerDriver`"]; CCompilers[]
(in a fresh kernel) and post what it returns. Also try ` Compile[x, x, CompilationTarget -> "C"]. Actually iy would be best if you went through those 4 steps I posted [here](http://stackoverflow.com/a/6549505/695132) and posted the results. Again: don't change things like
$CCompiler` before testing!! Can you start a Windows SDK Command Prompt and test manually that the compiler works (cl.exe)? $\endgroup$