-
Notifications
You must be signed in to change notification settings - Fork 11
Prerequisites for C Compiler
MathCompile depends on a C++ compiler that supports C++17 standard to compile Wolfram Language functions to machine code. The compiler used is typically choose automatically, but it can also controlled by CCompilerDriver`$CCompiler
, see the Documentation for more information.
To manually switch to GCC,
CCompilerDriver`$CCompiler = CCompilerDriver`GCCCompiler`GCCCompiler;
To enable Clang on Linux, set $CCompiler
with the installation path and specify the compiler name, e.g.
CCompilerDriver`$CCompiler = {
"Compiler" -> CCompilerDriver`GenericCCompiler`GenericCCompiler,
"CompilerInstallation" -> "/usr/bin" (* path to clang *),
"CompilerName" -> "clang++"
};
To enable Intel C++, set $CCompiler
with the installation path, e.g.
CCompilerDriver`$CCompiler = {
"Compiler" -> CCompilerDriver`IntelCompiler`IntelCompiler,
"CompilerInstallation" -> "/opt/intel/bin" (* path to icc *)
};
Intel C++ compiler is freely available to students and open source contributors, Intel Parallel Studio XE.
MSVC is available as part of Microsoft Visual Studio. MSVC 19.20 corresponds to the initial version of Visual Studio 2019.
To manually switch to MSVC, set $CCompiler
with the installation path, e.g.