[fpc-devel] a shared library suggestion

L505 fpc505 at z505.com
Wed May 10 02:45:44 CEST 2006


> yeah that technique requires far less stubs but it means that the coder has
> to manually call an init function.
>
> also how does your code respond if one of the entry points isn't found?

Myself I use

{$IFDEF DEBUG}
 if getprocaddress(somefunc) = nil then write('somefunc getproc error');
{$ENDIF DEBUG}

It does get very very tedious to type all this out for large libraries with 50 functions
or so.
If you want to economize the size of the library you turn off the {$DEFINE DEBUG}

Do you know that FPC will have a Package system available in fpc 2.1.1, sooner or later?
It will require shipping the RTL in a package, I think - which means we get into Package
hell like BPL's offered. I'd rather have the ability to load one package and not have to
ship the RTL as a package.

>




More information about the fpc-devel mailing list