Wolfram LibraryLink provides a powerful way to connect external code to Mathematica, enabling high-speed and memory-efficient execution.
39
votes
5answers
1k views
Minimal effort method for integrating C++ functions into Mathematica
As of Mathematica 8, what is the minimal effort way to integrate an existing C++ function into Mathematica?
I think we have these:
MathLink (it was quite long ago I used it last time)
communication ...
18
votes
3answers
490 views
Efficiently determining if 3D points are within a surface composed of polygons
This is the 2nd part of a previous question which I edited to make into 2 separate questions: Extracting polygons from 3D contour plot surface
As an extension of my earlier question involving simple ...
17
votes
1answer
401 views
Linking FORTRAN with Librarylink
FORTRAN code can be called using MathLink or .NET/Link (see the link for a worked examples).
But as mentioned in a talk by T.Gayley and J.Klein in Wolfram Technology Conference 2011, LibraryLink, ...
13
votes
1answer
234 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 ...
10
votes
1answer
121 views
Dynamic and LibraryLink: dynamic visualization of a simulation
I am asking this question to save some time and I am expecting answers only from people who have tried something like this before. (I realize that I could just try it and see if it works, but that ...
7
votes
2answers
373 views
Mathematica Library Link : How to use non standard 'mint' e.g. 'unsigned int' or 'long long int'
I use Mathematica 8.0.4 on Mac OSX 64 bit, and gcc as C compiler.
I am trying to write a LibraryLink function that deals with large positive integers i.e. greater than $2^{31}-1$. By dealing with, I ...
7
votes
1answer
382 views
Mathematica + Numerical Recipes
the idea of combining Mathematica with the new routines in the 3rd edition of Numerical Recipes (NR) is very interesting. In fact, there is a NR library to Matlab which works very well because not ...
7
votes
1answer
198 views
Converting other C++ classes to MTensor in LibraryLink
Hopefully this will be a quick question + a quick answer:
Say I have a C++ (or C) code using LibraryLink. I am using a library that defines a specific matrix class, as many numerical libraries ...
6
votes
1answer
133 views
Type conversion: LibraryLink mint vs. MathLink integer type
Assume the following situation: I have a WolframLibrary function which gets as parameter an integer tensor (which is for simplicity of rank 1) and the function should return an integer list through ...
5
votes
1answer
179 views
Accessing methods and properties of C++ objects?
Is it possible to access the properties or methods of C++ objects created with LibraryLink or MathLink like with J/Link ? Such capability doesn't seem built-in yet and I'm not sure it ever will as ...
4
votes
2answers
159 views
How to convert data types in a LibraryLink wrapper
I have a dynamic library which I want to load into Mathematica using LibraryLink. I don't have access to the source code of the library, so I need a C wrapper to do the job. In the C wrapper, I would ...
4
votes
0answers
83 views
How can I link the c library GAUL into Mathematica?
Is there a way to load the library GAUL (Genetic Algorithm Utility Library) for use within Mathematica?
3
votes
1answer
104 views
What is causing a type error when trying to modify Mathematica state from a function linked with LibraryLink
I've managed to reduce my problem to a very simple C program:
...
2
votes
1answer
116 views
Supported options for compiling LibraryLink code with VC++
I have to generate an interface to Mathematica for a fairly large library. I would like to use LibraryLink, as the generation seems much simpler. The platform is Windows (VS 2012), and I am ...
2
votes
2answers
103 views
LibraryFunctionLoad hangs under Windows
I'm running the Wolfram Finance Package version of Mathematica 8, under Windows 7 Professional. Any time I attempt to call LibraryFunctionLoad, the Kernel seems to ...
2
votes
1answer
1k 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 ...
2
votes
0answers
71 views
Why am I getting an error from MLPutFunction after getting the MathLink from LibraryLink?
Based on the example on the documentation page for
processMathLink, I've got the following C++ code:
...