Forum > Android

Free Pascal 2.6.x + linker options

(1/1)

meanderix:
Hi,

I followed Andru's excellent instructions for setting up the cross compiler with Free Pascal 2.6.x:

http://zengl.org/wiki/doku.php?id=compilation:android

Now everything seemed to work and I could compile the OpenGL projects with VFPv2 floating point precision.

However, when I tried to recompile one of the Lazarus packages (e.g. FCL), I would get this error:

--- Code: ---Target OS: Linux for ARMEL
Compiling fcllaz.pas
PPU Loading /usr/lib/fpc/2.6.1/units/arm-linux/rtl/system.ppu
Trying to use a unit which was compiled with a different FPU mode
Fatal: Can't find unit system used by fcllaz

--- End code ---

So I though, maybe "-CfVFPv2" isn't passed to the linker.

After updating fpc.cfg, with the following lines

--- Code: ---#IFDEF CPUARM
  -dANDROID
  -CpARMv6
  -CfVFPv2
  -Xd
#ENDIF
--- End code ---

everything works fine.

Is this what you're supposed to do? The linker options of the current project are not passed to the required packages automatically?

Leledumbo:

--- Quote ---The linker options of the current project are not passed to the required packages automatically?
--- End quote ---
Before updating fpc.cfg, where did you put -CfVFPv2?

meanderix:

--- Quote from: Leledumbo on July 24, 2012, 11:58:40 pm ---Before updating fpc.cfg, where did you put -CfVFPv2?

--- End quote ---
Project Options -> Other -> Custom options

Leledumbo:
What Lazarus version are you using? My Lazarus 0.9.30.4 behaves the same as yours, but my 1.1 detect compiler options change and attempt to recompile package dependencies with it. Well if not (sometimes it happens), just Run->Clean up build files->Clean and build.

meanderix:

--- Quote from: Leledumbo on July 25, 2012, 02:07:24 am ---What Lazarus version are you using? My Lazarus 0.9.30.4 behaves the same as yours, but my 1.1 detect compiler options change and attempt to recompile package dependencies with it. Well if not (sometimes it happens), just Run->Clean up build files->Clean and build.

--- End quote ---

Version 0.9.31. Sounds like I need to update it to a more recent version then.

Navigation

[0] Message Index

Go to full version