[fpc-pascal] Dynlibs.LoadLibrary on 64bit Debian (Ubuntu)
Jonas Maebe
jonas.maebe at elis.ugent.be
Wed Dec 24 22:25:47 CET 2008
On 24 Dec 2008, at 20:42, Andrew Brunner wrote:
> So what's with Dynlibs or Linux for that matter, not able to load
> libraries from sub folders inside mounts? Is *this a known issue?
No, but "sub folders inside mounts" has no meaning under unix (every
folder on your disk is a "sub folder inside a mount").
> If I copy the project1.so into my home folder, update the Application
> to load the lib from that path, all is good. Any ideas? Is there a
> config setting for binutils to "resolve" mounts?
dlopen() (which is what dynlibs calls under unix) is unrelated to
binutils (it's part of glibc). mounts do not need resolving.
Everything is a "mount" under unix (even the root directory).
> I want to close out this issue and report in bug track what's up with
> the entire matter...
What you can do is call dlerror when you get 0 back from loadlibrary,
as follows:
function dlerror: pchar; cdecl; external;
...
if dynlibs.loadlibrary(...) = 0 then
writeln(dlerror);
Maybe it will tell you something more.
Jonas
More information about the fpc-pascal
mailing list