[fpc-devel] Dynamically Loading Libraries
Marco van de Voort
marcov at stack.nl
Wed Nov 11 11:25:08 CET 2009
In our previous episode, Jeppe Johansen said:
> >
> > -Ivo Steinmann
> > <http://www.dict.cc/englisch-deutsch/criticism.html>
> >
> What about saying that
> procedure proc; external 'libname' name 'proc';
> denotes a function that's dynamically loaded implicitly, while
> procedure proc; external name 'proc';
> denotes a static linked function.
This syntax is not possible. The external 'xxx' name 'proc' is there for a reason,
for systems with multiple linker namespaces. Moreover there is already an
enormous codebase that uses this.
> In my opinion that seems like the only logical solution. Explicit
> dynamic loading will ofcourse still be possible, but you wouldn't need
> tools or lots of ifdefs
You still need to define which functions must be there to start.
> I'm not aware of how well it would work on Mac platforms, but I'm mostly
> certain most GNU/Linux and BSD's, and Windows has support for implicit
> dynamic linking in the executable formats
>
> This is ofcourse a solution that would require modification of the
> compiler, but I think in the long run that it'll make alot of things
> more comprehensible
I don't. I think this dynamically loading of headers has already gone to
far. It is a good workaround for a few headers that are versionwise a
disaster, like MySQL, but universally, it doesn't solve problems.
More information about the fpc-devel
mailing list