Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2016-06

Raspberry Pi / Shared Libraries

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin Waller

Hi,

I've been trying to build and load dynamically a simple shared library using Lazarus and the FPC. At the moment I have a simple one function shared library that compiles and builds cleanly and I have a couple of lines to try and load the library.

It consistently returns a handle of zero. The associated error from GetLoadErrorStr is "No such file or directory". Using objdump I can see that the library needs ld-linus-armhf.so.3 and that is in the /lib folder.

If I replace the library name with a shared library in the same folder generated using the C compiler then it loads fine.

The only different that I can see in that the Lazarus generated shared library has the soft-float ABI flag set and the C library has the hard-float ABI flag set!

Does anyone have any clues as to why this can fail.

Martin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160608/cae12710/attachment.html>

Reply by email

Fabio Luis Girardi
to Martin Waller

See: http://bugs.freepascal.org/view.php?id=26454

2016-06-08 13:08 GMT-03:00 Martin Waller :

Show quoted text 41 lines
Hi, I’ve been trying to build and load dynamically a simple shared library using Lazarus and the FPC. At the moment I have a simple one function shared library that compiles and builds cleanly and I have a couple of lines to try and load the library. It consistently returns a handle of zero. The associated error from GetLoadErrorStr is “No such file or directory”. Using objdump I can see that the library needs ld-linus-armhf.so.3 and that is in the /lib folder. If I replace the library name with a shared library in the same folder generated using the C compiler then it loads fine. The only different that I can see in that the Lazarus generated shared library has the soft-float ABI flag set and the C library has the hard-float ABI flag set! Does anyone have any clues as to why this can fail. Martin -- _______________________________________________ Lazarus mailing list http://lists.lazarus-ide.org/listinfo/lazarus
The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160608/a00e28da/attachment.html>

Reply by email