Michael Van Canneyt wrote:

On Thu, 21 Jul 2005, Agustin Barto wrote:

I'd like to use some scientific/math librearies like LAPACK and
GNU/GSL with fpc. I already know about h2pas and external subroutines
and variables, but I wanted to know if these methods will be able to
deal with libraries as complex as LAPACK (clapack obviously) and GSL.

Yes, it should work.
I have used (parts of) lapack without problems. You just need lots of declarations like:

function dsytrd_(var uplo: Char; var n: Integer; var a: Double; var lda: Integer; var d__: Double; var e: Double; var tau: Double; var work: Double; var lwork: Integer; var info: Integer; uplo_len: Integer): Integer; cdecl; external;
(It is possible to generate these semi-automatically with f2c)

and a {$LINKLIB lapack}

It may also be appropriate to override a few support routines, like the error reporting routine.

Colin



_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to