From: Peter Gerwinski peter@gerwinski.de To: "Nathalie Jarosz" jarosz_n@hotmail.com Subject: Re: beta distribution Date: Wed, 28 Jun 2000 17:41:48 +0200
Hi, Nathalie!
I got the file `gpm.pas' but I don't really understand what I have to
do?
Is it like a model to understand how to use something written in C in
order
to compile it with gpc [...]
Exactly.
Some more instructions are in the GPC FAQ list.
In short: To use functions
extern double foo (double x); extern void bar (void);
you write a Pascal unit as follows:
unit FooBar; interface function Foo (x: Real); C; procedure Bar; C; implementation end.
Then your program can call the functions:
program Something; uses FooBar; begin Bar; writeln (Foo (42)) end.
Hope this helps,
Peter
PS: Better continue asking questions about GPC on the GPC mailing list, so everybody can profit from the answer. (Be welcome to forward this email to the list.)
-- http://home.pages.de/~Peter.Gerwinski/ - G-N-U GmbH: http://www.g-n-u.de Maintainer GNU Pascal - http://home.pages.de/~GNU-Pascal/ - gpc-19990118 GnuPG key fingerprint: 9E7C 0FC4 8A62 5536 1730 A932 9834 65DB 2143 9422 keys: http://www.gerwinski.de/pubkeys/ - AntiSpam: http://spam.abuse.net
________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com