[fpc-pascal] Re: library initialization and deinitialization

L L at z505.com
Mon Jun 18 06:52:28 CEST 2007


> I've got a shared library (.so) I wrote in C, with initialization and
> finalization code declared by using the GCC attributes constructor and
> destructor. These init and fini functions simply print out "start" and
> "stop" to stdout. The .so exports one function, which prints out
> "Hello".
> 
> I've got a test program (also written in C) which calls the .so's
> function. What I see on stdout is
> 
> start
> Hello
> stop
> 
> Just like you'd expect.
> 
> I wrote a Free Pascal test program which also uses the .so. However,
> what I see is this:
> 
> start
> Hello

Haven't closely studied your problem, but probably related to this:
http://www.freepascal.org/mantis/view.php?id=6822
http://www.freepascal.org/mantis/view.php?id=7838

Regards,
Lars





More information about the fpc-pascal mailing list