[fpc-devel] Exception problems in FPC 3.0.0

Yury Sidorov jura at cp-lab.com
Thu Oct 29 12:51:46 CET 2015

On 10/29/2015 1:22 PM, Sergio Flores wrote:
>> I've never experienced such issues. You should try to use different NDK
>> versions. I use ndk-r8d. It is stable.
> I got the latest ndk download, it works fine, most of my problems were
> derived from using Mingw, switching to Cygwin solved the issues.

Actually there is no need to use mingw or cygwin at all. All needed 
build tools are bundled with win32 fpc release. No extra tools are 
needed to build FPC from sources.

>>Do you use static .a libs?
> I generate a .a lib that contains all pascal code, which is then loaded
> by java "dynamically" at the app startup. I'm not sure if there's other
> alternative approaches that allow mixing Java and Pascal in Android (I
> know how it possible to create a pure NDK app in Pascal, however lots of
> Java SDKs that I use that don't play well with that).

You build a dynamic .so library not a static .a library. You can not 
load a static library from Java.

>>The issue seems to be specific for your environment only. If you not try
>> to find out the reason, it will never be fixed.
> Sure, I'll try again if I find some precompiled release with hard float
> support so I can understand better where the problem is.
> As for now, I'll keep using the old compiler, as it works fine and I
> don't need the new features that were introduced in 3.0.

I've performed more tests and found out that arm hard float exceptions 
are not handled at all in Android. It seems there is no need to mask them.

Looks like you have some installation issue. You can try to install FPC 
3.0 on some clear system and build your library.


More information about the fpc-devel mailing list