[fpc-pascal] Linking error with unit initc on arm

Jonas Maebe jonas.maebe at elis.ugent.be
Fri Aug 21 14:13:06 CEST 2015

On 21/08/15 14:03, Martin Schreiber wrote:
> On Friday 21 August 2015 12:56:36 Jonas Maebe wrote:
>> That's because the compiler warned that it could not find those files,
>> so it didn't tell the linker to link against them either. You need the
>> armhf sysroot for that and tell the compiler where to find it. And in
>> addition to /usr, it's best to copy also /lib
> I got linking working without xlib in uses by copying the necessary *.o's, but 
> now the application crashes when remote gdb tries to set a breakpoint...

Does it work if you don't use gdb?

>>> Interesting is that adding "xlib" to uses is enough to build working
>>> eabihf applications by cross compiling to Raspberry Py.
>> I don't know why that would be the case.
> I can cross compile and remote debug MSEgui applications with the mentioned 
> setup without problems. Console applications work too if xlib is in uses. A 
> miracle! :-)

Maybe the xlib unit links against a library that defines those symbols
as weak symbols. This would mean that if no other code defines those
symbols, the versions from that library will be used, and otherwise the
versions from the other code (and you won't get duplicate symbol errors
due to the weak nature).


More information about the fpc-pascal mailing list