Delphi: Why Can I not use FMX.FORMS in a DYLIB


I am using the TMS FMX Cloud Pack. Throughout their code is liberally sprinkled FMX.Forms (and FMX.Dialogs which uses FMX.Forms). I currently use these libraries in a VCL DLL successfully.

My initial testing shows that, if I have FMX.Forms in the Uses clause of a DYLIB, the host application flashes in the MAC task bar and the application fails to start (I suspect because the DYLIB fails to load).

EDIT: I get this error when running from the Windows IDE through PAServer (I get no error when running from Finder on the MAC VM):

/BuildRoot/Library/Caches/ Error: unsupported compressor 8
/BuildRoot/Library/Caches/ Error: Unknown compression scheme encountered for file ‘/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Exceptions.plist’
/BuildRoot/Library/Caches/ Error: unsupported compressor 8
/BuildRoot/Library/Caches/ Error: Unknown compression scheme encountered for file ‘/System/Library/CoreServices/CoreTypes.bundle/Contents/Library/AppExceptions.bundle/Exceptions.plist’
Runtime error 230 at 0015EA03

The simple test application is here: Working HOST/DYLIB application. If I simply add FMX.Forms to the uses clause I get the behaviour above.

Question 1: Is this expected behaviour?

Question 2: Is there a workaround (without removing FMX.Forms – since I use the TMS FMX Cloud Pack third party libraries)?


This appear to be the manifestation of this error “Unable to register class TFMXApplicationDelegate” when the application is run on a Physical Machine. The “Runtime Error 230” is what I get When I run the application within a Parallels macOS VM.

Regardless, the workaround to the “Unable to register class TFMXApplicationDelegate” issue is to NOT use FMX.Forms (or any unit that uses FMX.Forms in a DYLIB. All well and good, except that I am using (extensively) the TMS FMX Cloud Pack which uses FMX.Forms and FMX.Dialogs (which contains FMX.Forms) white liberally. Me trying to take out FMX.Forms etc from their code seems overly ambitious and, quite frankly, is getting to the point of why we buy third party libraries in the first place. If the just don’t work, then they probably should not be used. And yes, I have emailed the Vendor.

But if anyone has any ideas how this might be resolved so that I can indeed use FMX.Forms in a DYLIB then please let me know.

Comments are closed.