[fpc-devel] Exporting functions in an Android library

Sergio Flores relfos at gmail.com
Tue Aug 19 16:50:09 CEST 2014

Hi Sven, thanks for the fast answer.
I did not found that about [public] because I thought it was just an option
of "export", and so always search for export documentation.

And I did have an exports function in main file, I told about it in my
previous mail, that was not the problem.

I checked better the compilation output, and I found out why there is a
There are too many assembler errors in all of my files!

build\TERRA_Localization.s:3184: Error: only lo regs allowed with immediate
-- `mov r8,#0'
build\TERRA_Localization.s:3212: Error: Thumb does not support conditional
build\TERRA_Localization.s:3214: Error: unshifted register required -- `mvn

Thus the object files are not generated correctly, they were probably empty
or something?
So I went and rebuilt FPC, to make sure it was only ok, and then I saw it,
those assembler errors also appeared during FPC compilation...

I tried many combinations of switches and finally found the culprit, it was
I changed it to -CpARMV5 and changed from -CfVFPV3 to -CfVFPV2.
Now FPC builds without assembly errors and my game too, and the export
symbols are there.
The game runs without crashing, and even threads work now, so good, I'm
making progress!

As far I know armv5 has inferior performance, eg: does not support hard
floating point?
I really needed armv7 to work, so I investigated a bit more. It seems that
trunk fpc supports lots of armv7 variations, and the proper one seems to be
I compiled again FPC and my game with this instruction set, and it runs

So the problem was just that, I dont know why the previous FPC version
worked fine with that instruction set thought, maybe armv7 defaulted to
armv7a or something?

Again, thanks again to everyone that made FPC a reality, you guys are great!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20140819/aebd04ce/attachment.html>

More information about the fpc-devel mailing list