[fpc-pascal] How to build .so with FPC and use it in C program?
Jonas Maebe
jonas.maebe at elis.ugent.be
Thu Dec 11 15:10:56 CET 2008
On 11 Dec 2008, at 15:03, Marco van de Voort wrote:
> In our previous episode, Jonas Maebe said:
>>>> FPC cannot build dynamic libraries on FreeBSD at this time (well,
>>>> at least
>>>> none that work properly with C programs).
>>>
>>> Can this be done for other platforms? eg: Linux 32/64bit and
>>> Windows
>>> 32/64bit etc...
>>> I'm mostly interested in 32bit Linux & Windows OS's.
>>
>> Only the FreeBSD port is broken in that respect as far as I know.
>
> I'm not entirely sure how it should work at all. Linux calls the
> "main" of a
> .so, but I never found any docs for that.
Under Linux, you pass the library's init and fini routines to the
static linker using the "-init" and "-fini" parameters. See compiler/
systems/t_linux.pas.
Jonas
More information about the fpc-pascal
mailing list