11
$\begingroup$

On Windows 7 I was using Microsoft Visual C++ as CCompilerDriver. For this, the minimal solution is to install Microsoft .Net and then Microsoft SDK-7.1. There is no need to install Microsoft Visual Studio.

Now I am trying to install Microsoft C++ compiler to work with Mathematica 11 on Windows 10. The difference with Windows 7 is that in Windows 10 Microsoft .Net is a part of OS. Another difference is that SDK-10 does not contain C compiler, as I have found after installation. And it is impossible to install SDK-7.1 as it seems to be incompatible with the pre-installed .Net.

Could anybody propose a minimal solution to install the Microsoft C compiler on Windows 10?

$\endgroup$
13
  • 2
    $\begingroup$ I'm voting to close this question as off-topic because it is not about Mathematica or any of the other Wolfram Research software for which questions are accepted on this site. $\endgroup$
    – m_goldberg
    Sep 11, 2016 at 6:57
  • 9
    $\begingroup$ @m_goldberg I don't agree with you here. Having a C compiler correctly installed is a prerequisite for the correct operation of Mathematica's Compile function with `CompilationTarget->"C" option. We have had many useful questions on that and stuff like CUDA. This is absolutely on-topic as far as I'm concerned. $\endgroup$ Sep 11, 2016 at 7:28
  • 3
    $\begingroup$ I would try this: landinghub.visualstudio.com/visual-cpp-build-tools I don't know if it works because at the time when I installed this the only solution that seemed to be available was VS Community Edition (i.e. full IDE). So that's what I have, even though I don't use the IDE part. I do agree that this isn't really Mathematica related as the main part of the question seems to be how to avoid installing a full IDE ... $\endgroup$
    – Szabolcs
    Sep 11, 2016 at 7:37
  • 1
    $\begingroup$ Thank you, Szabolcs, for a good advice! I have installed the Standalone Microsoft Visual C++ compiler and Mathematica 11 recognizes it as ccompilerdriver. $\endgroup$ Sep 11, 2016 at 18:30
  • 1
    $\begingroup$ @m_goldberg Well, I've had problems getting past my corporate firewall to access curated data and have been asking questions about that. So, yes. $\endgroup$ Sep 11, 2016 at 20:45

1 Answer 1

4
$\begingroup$

I have installed the Standalone Microsoft Visual C++ compiler, as suggested by Szabolcs, landinghub.visualstudio.com/visual-cpp-build-tools. It is getting recognized by Mathematica 11 and working on Windows 10.

Note that you don't have to install Microsoft .NET since on Windows 10 it is a part of OS.

$\endgroup$
2
  • $\begingroup$ After install Encounter with a problem with Mathematica 11.1 on Windows 10. CreateExecutable::cmperr: Compile error: LINK : fatal error LNK1181: cannot open input file 'user32.lib' $\endgroup$ Aug 28, 2017 at 5:14
  • $\begingroup$ Unfortunately, this solution doesn't seem to work for me either (I have Mathematica 10.2 on Win 10 64 bit). I also followed Szabolcs solution for making Mathematica 10.2 recognize the VisualStudio Compiler in "VisualStudioCompiler.m": here. Funny enough, if I execute CCompilers[] Mathematica shows that it has found the VS compiler. But it says there "CompilerName" -> Automatic". Anyway trying to compile anything with CompilationTarget->"C" or the "hello world"-example fails. $\endgroup$
    – Quit007
    Oct 8, 2017 at 19:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.