[fpc-pascal] Free Pascal created libraries used by other languages

Graeme Geldenhuys graeme at mastermaths.co.za
Wed Dec 9 14:46:53 CET 2009

Michael Van Canneyt wrote:
> 2. Since FPGui is object oriented, it will be unusable unless you devise
>    a 'flat' API.

Is't there a way the FPC compiler can automatically flatten object oriented

As a test I created a new library project and included the
fpgui_toolkit.pas unit which contains references to all units available in
fpGUI Toolkit. I had to add the -fPIC compiler parameter and in
successfully compiled a fpgui_toolkit.so file.

I know I can't use that file, because no functions have been exported. But
viewing the .so file with Midnight Commander (pressing F3) shows me what
looks like a 100% flattened API of fpGUI Toolkit - it's probably debug
information. But doesn't that mean the compiler could also do something
similar an instead generate exported methods (flattened API).

See the URL for a image of what Midnight Commander shows me:


  - Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal

More information about the fpc-pascal mailing list