[fpc-devel]'FPC_INITIALIZEUNITS' [was] LINKING a pp library from...

Michael Van Canneyt michael.vancanneyt at wisa.be
Wed May 23 15:17:17 CEST 2001

On Wed, 23 May 2001, Javier Ros Ganuza wrote:

> Michael, thanks for your quick answer:
> I'm now trying to elucidate how to call such a function, and the only
> reference I've found to it has been something like
> emitinsertcall('FPC_INITIALIZEUNITS'); within the compiler source, but I
> don't know how to call such function from a normal program. Could you be
> more specific or point me to some place within the docs or to some
> example?. I haven't benn able to find more information...

You must simply declare it as an external procedure, and call it.
This is explained in the docs.

In a C program you should declare something like

extern void FPC_INITIALIZEUNITS (void);

and then just

main () {



in a pascal program, do a

procedure FPC_INITIALIZEUNITS; external;


> I supouse that I have to make a especial mylibrary initialization
> procedure, to be called from the main C program, though library, unlike
> units, do not have initialization and termination codes.
> Could be a more elegant trick to put a specific intialization unit in
> the uses clause of the library ?

No that will not help.


More information about the fpc-devel mailing list