FPC + shared library + ARM HF: Workaround

It’s been two years when I was developing a project to run on Raspberry Pi, and to my chagrin, I found a bug when Freepascal is used to develop shared libraries (DLL) when the compiler target is armhf-linux. Applications created with FPC for this target is no problem, only shared libraries, and if the application tries to load a generated library in C/C++, it works perfectly.

Following the notes added to the bug report, Jonas Maebe suggested adding the unit INITC from the library uses. I did some tests, and to my surprise, this workaround worked with a charm. The sadness is that I deactivated the project because I discovered this too late 😐

So yesterday I was notified that the Debian development team added a patch that fix that, but I could not download a image to test the patch. Anyway I think for the next version of Free Pascal (3.0.2, scheduled for October) it will be fixed.

You can see more here: http://bugs.freepascal.org/view.php?id=26454

4 thoughts on “FPC + shared library + ARM HF: Workaround

    • Fabio Luis Girardi Post authorReply

      At least I known, no. The last Delphi version that I tested is Delphi XE2, and XE3 has differences if compared XE2.

  1. Geir Lexau Reply

    Hello.
    Where can I find these methods/constants ?

    AppDoNotCallAsyncQueue
    if (Application.Flags*[AppDoNotCallAsyncQueue]=[]) then
    Application.QueueAsyncCall(@ASyncMethod,PtrInt(x));
    Regards Geir

Leave a Reply

Your email address will not be published. Required fields are marked *