[fpc-devel] Dynamically Loading Libraries

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Nov 11 13:21:31 CET 2009


On 10 Nov 2009, at 23:24, Jeppe Johansen wrote:

> 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.
>
> 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
>
> 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

What do you mean by "implicit dynamic linking"?

> 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

It would also require modifications to several existing header  
translations, and depending on what "implicit dynamic linking" means,  
it would also make it impossible to use the same unit for static and  
for dynamic linking, while this is currently possible. It would also  
break backwards compatibility. And like Marco I'm not sure what the  
big problem is that is solved with this.


Jonas



More information about the fpc-devel mailing list