Skip to main content

All Questions

Filter by
Sorted by
Tagged with
3 votes
0 answers
75 views

GSL multiroot finding mode Hybrid function load with Mathematica : Crash

Hi everyone I work on a Mac M1 Sonoma 14.3 with Mathematica 12.3.1 and 14.0 I have an issue when using a C++ multiroot finding from GSL library. I used this example : https://www.gnu.org/software/gsl/...
Alex's user avatar
  • 51
2 votes
1 answer
118 views

How to Compile functions to C in parallel?

I need to Compile functions for use on parallel kernels. There are many such functions, so compiling in parallel is desirable. When compiling functions with ...
Kuba hasn't forgotten Monica's user avatar
0 votes
1 answer
91 views

Can I use a C compiler from behind WSL?

I've got 13.3 on Windows 11 (22H2) and a gnu compiler suite under WSL2 (Arch). Seems it is possible to compile in Windows with VS Code (which I also have). Do I still need to install another C ...
მამუკა ჯიბლაძე's user avatar
0 votes
1 answer
158 views

How to compile this function to speed up operation?

...
miss's user avatar
  • 884
0 votes
0 answers
70 views

May the runtime of a code compiled in C depend on the C compiler used?

I have a Windows machine with installed Mathematica. I compile the code in C. The compiler I use is CCompilerDriver`VisualStudioCompiler`VisualStudioCompiler from ...
John Taylor's user avatar
  • 5,963
6 votes
1 answer
159 views

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

I am using Mathematica 12.2. I found that running Needs["CCompilerDriver`"]; kind of freezes my Mathematica, it just never stop. Alt+. can not abort it ...
matheorem's user avatar
  • 17.4k
6 votes
1 answer
288 views

Mathematica does not recognize c compiler

I have Mathematica 11.1 and Windows 10 OS. I need to use c based compilation inside Mathematica, like ...
John Taylor's user avatar
  • 5,963
4 votes
0 answers
151 views

How to compile effectively with recent MMA? Global variables in C code, compilation of C code

I have read the generously comprehensive answers by @leonidshifrin and @xzczd to the question How to compile effectively but more than seven years have now passed, and whilst I am sure much remains ...
Julian Moore's user avatar
  • 2,570
3 votes
0 answers
94 views

What are the recommended best practices for and common pitfalls of using Compile? [duplicate]

As evidenced in my last question there is much I do not know about how to write compilable functions. The basics are clear: one must load the appropriate packages ...
Julian Moore's user avatar
  • 2,570
7 votes
2 answers
330 views

Error during getting CCompilerDriver

I have Window 10, Mathematica 11.3 and Visual Studio Community 2013 (Update 5). If I try to get the package CCOmpilerDriver`, I get follow error: ...
Kirill Belov's user avatar
1 vote
1 answer
512 views

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

How can I tell MMA where to find c header files for compilation? CreateLibrary is returning C1083 can't find stddef.h. Details follow... Windows 10 - 1709 using Visual Studio 2015 (Community Edition, ...
Julian Moore's user avatar
  • 2,570
24 votes
1 answer
1k views

Getting Compile to work with Visual Studio 2017 Community Edition

The new Visual Studio is out since a week and I tried to get it to work with Mathematica (versions 11.0 and 11.1). However, the usual tricks for working with a new VS version fail here. Related ...
Sjoerd C. de Vries's user avatar
3 votes
1 answer
182 views

Can't run CreateExecutable example

I'm trying to run this example from the Wolfram website, on Linux Mint 16. ...
gypsophila's user avatar
9 votes
1 answer
249 views

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

I am running Mathematica on a Windows 10 machine and I would like to develop a package for public distribution. Most of the package will be Mathematica code, but some timing-critical parts should be ...
Ben Niehoff's user avatar
7 votes
1 answer
120 views

Closing over array values makes Compile choke with CompilationTarget -> "C"

When I attempt to Compile a closure which contains an array of the appropriate type, it works just fine with ...
Pillsy's user avatar
  • 18.6k
3 votes
1 answer
253 views

CCompile Problems

Operating System: Windows 8.1 Mathematica: 8 In possession of: Visual Studio 2013 and 2015 Had to alter the visual studios driver file within CCompilerDriver application, add-on so that it found the ...
Belphegor's user avatar
1 vote
0 answers
1k views

How to get Mathematica to compile with target C? [closed]

I have been trying to compile some functions in mathematica with target C for speed. basically when I try: ...
Raf's user avatar
  • 111
15 votes
2 answers
3k views

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

I'm trying to set up my new Windows 8.1 tablet to compile Mathematica (9.0.1) functions to C, using the MinGW-64 compiler. I have it set up so that the following works: ...
Leon Avery's user avatar
  • 1,352
8 votes
0 answers
548 views

How to force the compilation language to be C++ (not C) in CreateExecutable or CreateLibrary

I'm trying to speed up a section of a Mathematica 9.0.1 notebook by performing some calculations in C++ with the Cilk Plus and Threading Building Blocks tools available for the Intel C++ 14.0 compiler ...
user15996's user avatar
  • 627
2 votes
1 answer
377 views

Mathematica Compiled Functions - additional functions

Mathematica supports an exact list of compilable functions: They are listed here: List of compilable functions. However, I would need to add the following functions: ToExpression, StringFreeQ, ...
user13675's user avatar
  • 947
10 votes
0 answers
295 views

Check whether a working CCompiler is installed

Let me give a bit background: As many of my answers imply, I often use the auto-parallelization (meaning, that Mathematica distributes the calculation automatically over several cores when list-...
halirutan's user avatar
  • 113k
16 votes
2 answers
681 views

Using Boost with CreateLibrary

I was looking at the answer of Leonid of Faster alternatives for DayOfWeek and wanted to see how hard it would be to do something similar in C++ using an external library like Boost. I tried to ...
faysou's user avatar
  • 11k
15 votes
3 answers
2k views

What compilers are "suitable" for CompilationTarget->"C"?

The documentation for CompilationTarget says, "if you do not have a suitable C compiler then you will not be able to set CompilationTarget to C". Well at this time, I don't have a compiler installed ...
Ted Ersek's user avatar
  • 7,164
17 votes
1 answer
2k views

How to install and configure Intel C++ Compiler for Mathematica correctly?

I wish to try the trial version of the latest Intel C++ Compiler for Windows with Mathematica. I have downloaded the current version of Intel® C++ Composer XE 2011 for Windows and installed only the "...
Alexey Popkov's user avatar
33 votes
1 answer
7k views

How do I get Mathematica to recognize a C compiler on a 64-bit Windows machine?

Mathematica does not recognize any C compiler on my computer. I run Mathematica 8.0.4.0 on Windows 7. I've tried to make sure various C compilers are installed on my computer, but I'm not sure how to ...
Paul's user avatar
  • 775
2 votes
2 answers
8k views

Visual Studio Express 2010 on x86-64: libcmt.lib missing

The CCompilerDriver documentation explains that to use visual studio express on 64-bit targets, it's necessary to install the windows SDK after installing visual studio. I have done this, first ...
Lev Bishop's user avatar