TransWikia.com

Mathematica does not recognize c compiler

Mathematica Asked on October 3, 2021

I have Mathematica 11.1 and Windows 10 OS. I need to use c based compilation inside Mathematica, like Compile[..., CompilationTarget -> "C", CompilationOptions -> {"InlineExternalDefinitions" -> True}].

To do this, I have first downloaded Microsoft C++ Build Tools 2019. Then I have installed it. Finally, following answers on this question, I have modified the VisualStudioCompiler.m file, adding there
"2019" to the list of $VisualStudioVersions and the string

installPath["2019"] := installPathFromEnvironment["VS166COMNTOOLS"]

(the version of C++ build tools is 16.6, which is reflected in VS166…).

However, when launching

Needs["CCompilerDriver`"]
CCompilers[Full]
CCompilers[]

I get {}.

Could you please tell me what have I made wrong?

One Answer

Mathematica 11.0.1 here, worked OTB only w/ Visual Studio EXPRESS 2015. Tried 2019 and 2017 (also editing .m file) but they're not compatible. To download Express 2015, you have to sign up to the free Visual Studio subscription ando go to https://my.visualstudio.com/Downloads?q=visual%20studio%202015&wt.mc_id=o~msft~vscom~older-downloads

Answered by Fernando on October 3, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP