Call C (or C++) with pointer to static function

Lars T. Kyllingstad public at kyllingen.NOSPAMnet
Mon Oct 11 06:56:49 PDT 2010


On Sun, 10 Oct 2010 20:30:52 -0400, Michael Stover wrote:
 
> Can one call fortran libraries from D?  Ie, say one wanted to use LAPACK
> from D?

Since it is possible in C, it should be possible in D.  A quick search 
turned up this page:

http://www.yolinux.com/TUTORIALS/LinuxTutorialMixingFortranAndC.html

When it comes to LAPACK (and BLAS), Bill Baxter has already written D1 
bindings.  I've converted them to D2 and published them (with his kind 
permission) as part of SciD (see scid.bindings.*).  Which brings me to 
your next question...


> Also, know of any mathematical libraries written in D (like
> implementations of runge-kutta, linear algebra routines and data
> structures, optimization or curve-fitting algorithms)?

Of the things you mention, SciD only contains a few linear algebra 
routines (see scid.linalg and the aforementioned BLAS/LAPACK bindings).  
There may be other things you'll find useful in there, though:

  http://www.dsource.org/projects/scid

Also, check out this list (may not be up to date):

  http://www.prowiki.org/wiki4d/wiki.cgi?ScientificLibraries


-Lats


More information about the Digitalmars-d mailing list