[fpc-devel]Exporting variables in libraries for Linux / FreeBSD

Maarten Bekers elevator at planet.nl
Sat Feb 15 20:42:58 CET 2003


hey Marco,

> > I see. Is there any chance of getting this feature implemented, or would
it
> > be better to try to write a library in C that in turn uses my library in
FPC
> > to provide the functionality that it should?
>
> I wouldn't do that. I'd make getters and setters (functions and procedures
> wrappers to read/write vars) to access them. These even can get handy
later
> to get things threadsafe.
Yeah, i use that technique in a lot of my code too, unfortunately, Apache
requires you to export an variable, so that it can load the
procedure/function addresses, in order to be able to create an Apache
module, so i'm affraid i'll have to try to craete a wrapper library.

groeten, Maarten.




More information about the fpc-devel mailing list