MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: LibraryLink & MinGW

Well, unlike Alexander Rasputinov, I am using the 32 bit implementation,
and as he suspected, in this case everything works "out of the box" 
indeed.  I downloaded the the MinGW from its official website.
But, of course, in order to create the .dll I do not need to use gcc
and all that directly but everything is taken care of "out of the box"
by the appropriate Mathematica commands as e.g. CreateLibrary[].
(Of course, if you need any special libraries for your project you
need to tell this in the CreateLibrary[] command as documented. So, e.g.
I am linking in some code which was written in Fortran so I explicitely
have to load the standard Fortran libraries)

The only small issue I encountered was the fact that in order that
everthing really works "out of the box" you MUST install MinGW in
its default directory, which is "C:\MinGW". If you install it e.g. on 
another partition, the Mathematica interface to the Compiler does not 
find it. This restriction can be circumvented, but then you must change 
some Mathematica files, which I do not recommend. (Actually I find it 
rather strange that the carfully designed Mathematica interface to the 
various compilers has such a restriction, which could be easily avoided 
to my opinion.)


Am 28.6.2012 10:07, schrieb Mike Griffis:
> When reviewing these comments, I started thinking my issue is using win32 port of mingw.  Are you using win64?  Where are you downloading your mingw? I think only gets you a win32 port.  (My gcc commands were minimal to compile and create a "shared" library.)

  • Prev by Date: Re: Approximate Zero Times A Symbol
  • Next by Date: Re: Higher precision in Error function Erf[] needed.
  • Previous by thread: Re: LibraryLink & MinGW
  • Next by thread: DirectedInfinity when solving limit