[fpc-devel]Error exiting dynamic library

Javier Ros jros at unavarra.es
Tue Mar 16 20:52:13 CET 2004

I've changed a large portion of a program to be a dynamic library, in
order to assure that the interface and the kernel are effectively

The same units that make the library can be linked directly (statically)
with the the interface, an there is no problem.

When using the dynamic library the program performs nicely but when
exiting the program, the following error happens.

An unhandled exception occurred at 0x00000000 :
EACCESSVIOLATION : Access violation

That is repeated 21 times. After I have to exit the program using

The debugger reach the last line (end.) an then happens, so I cant
figure how to debug the problem.

Using -gl or -gh flags to compile (both interface and library) is
useless, no extra information is provided.

Some pointer to function variables in the library are initialized to
point interface functions, setting them to nil before exiting the
program does not help.

Any clues?


ppc386 -v
Free Pascal Compiler version 1.0.10 [2003/06/26] for i386
Copyright (c) 1993-2003 by Florian Klaempfl

More information about the fpc-devel mailing list