I am running Mathematica 10.2 on Windows 7 (64bit) and when I want to use the C compiler I get the message:
A C compiler cannot be found on your system. Please consult the documentation to learn how to set up suitable compilers.
I have done the following:
Needs["CCompilerDriver`"]
then CCompilers[]gives Out= {}
CCompilers[Full] gives
{"Name" -> "Intel Compiler", "Compiler" -> CCompilerDriver`IntelCompiler`IntelCompiler, "CompilerInstallation" -> None, "CompilerName" -> Automatic}, {"Name" -> "Generic C Compiler", "Compiler" -> CCompilerDriver`GenericCCompiler`GenericCCompiler, "CompilerInstallation" -> None, "CompilerName" -> Automatic}}
though I have Visual Studio 2015 installed. (I have compiled "Hello World" as console application in VS and it worked there, convincing me that I do have a C compiler).
For GetEnvironment[]I get
{... "VS140COMNTOOLS" -> "C:\\Program Files (x86)\\Microsoft Visual Studio \14.0\\Common7\\Tools\\", ...}
(though when I look up this directory I don't see a compiler in there, but the C compiler (cl.exe) seems to be in: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin).
How can I tell Mathematica where to find the C compiler?
Cheers, Bernhard