8 votes
Accepted

Error during getting CCompilerDriver

Please use the fix from @ilian's answer instead!! The underlying problem I think the underlying problem is with the RawJSON importer. JSON is required to be UTF8. But a character encoding like ...
Szabolcs's user avatar
  • 235k
7 votes

Getting Compile to work with Visual Studio 2017 Community Edition

Since version 11.2.0, the CCompilerDriver package has been updated and supports Microsoft Visual Studio 2017. As mentioned in the question, starting with VS2017 ...
ilian's user avatar
  • 25.5k
7 votes

MinGW-64 and CompilationTarget -> "C": can't make library

This is both a comment, too long to be posted as a comment, on the previous answer, and another answer. The reason for posting is that the steps that I had to do to get MinGW-64 working on my ...
Fred Simons's user avatar
  • 10.2k
6 votes

Error during getting CCompilerDriver

This has been fixed by a paclet update. Windows 11.3 installations will be automatically updated over the next few days. To get the new paclet immediately, try ...
ilian's user avatar
  • 25.5k
6 votes
Accepted

Default compiler optimization flag used by LibraryLink (CreateLibrary)?

This depends on the specific compiler driver that is being used. The easiest way to get not only the compiler options, but the entire compilation command is to add ...
Szabolcs's user avatar
  • 235k
5 votes

Using VS Studio Compiler with MMA 10.1

I can now confirm that the instructions in the answer to question [41682][1] and in the [community group][2] work. CAUTIONS VisualStudioCompiler.m cannot be saved back directly to its orignal ...
Julian Moore's user avatar
  • 2,560
4 votes

Installing Microsoft C compiler on Windows 10

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 ...
Dmitry Garanin's user avatar
4 votes
Accepted

How to cross-compile LibraryLink code for multi-platform distribution

As I understand, your aim is to compile a LibraryLink library for platform Y when you only have a Mathematica license for platform X. I don't know much about cross-compiling, so I won't comment on ...
Szabolcs's user avatar
  • 235k
4 votes

CreateLibrary fails... path to C header files problem?

I doubt this is related to Mathematica. Can cl.exe compile any program containing #include <stddef.h> from a VS2015 command prompt? These headers would be ...
ilian's user avatar
  • 25.5k
4 votes

Mathematica never stop when running Needs["CCompilerDriver`"]

I solved this issue myself by accident. I usually put Needs["CCompilerDriver`"] in init.m file, and I found even if I closed the frozen Mathematica, I can not delete the init.m file. Then I ...
matheorem's user avatar
  • 17.1k
3 votes

Mathematica does not recognize c compiler

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 ...
Fernando's user avatar
3 votes

How to Compile functions to C in parallel?

It seems that SymbolicC`Utilities`ClangFormatString is not designed for parallel operation. It uses a hardcoded path that's same on all kernels. Thus, when invoked ...
Kuba hasn't forgotten Monica's user avatar
3 votes
Accepted

Can't run CreateExecutable example

I added the options "ShellCommandFunction" -> Print and "ShellOutputFunction" -> Print to CreateExecutable, they print the ...
gypsophila's user avatar
2 votes
Accepted

System Modeler 4 on Mac X El Capitan does not work

SystemModeler 3 and it's really old and doesn't support recent versions of Xcode (you need a Xcode version that use the C++ standard library from gcc by default and not libc++). You need to upgrade ...
Jose Enrique Calderon's user avatar
2 votes

Using Boost with CreateLibrary

Further to the excellent answer from @wxffles: This answer works for: Mathematica 12 Boost v1.63 Visual Studio 2017 First compile the static libraries with Boost. Open a Visual Studio 2017 x64 ...
Contango's user avatar
  • 463
1 vote
Accepted

Can I use a C compiler from behind WSL?

Do I still need to install another C compiler in Windows Yes. You need a compiler that targets Windows, not Linux.
Szabolcs's user avatar
  • 235k
1 vote

How to compile this function to speed up operation?

The following code is original by @flc: ...
miss's user avatar
  • 784
1 vote

Compiled library crashes at WolframLibraryData_new

It appears that the line WolframLibraryData_free(libData); in my wrapper c-file causes this problem. Removing it solves the segmentation fault happening after ...
Marijnn's user avatar
  • 287
1 vote

LibraryFunctionLoad for multivariate C++ function containing several arguments

In case anyone has the same (badly formulated) question, here is how you do it. The C code in Mathematica contains the function ...
Fred's user avatar
  • 29

Only top scored, non community-wiki answers of a minimum length are eligible