Error compiling library on Linux 64 bit (OK with Linux 32 bit)
Original Reporter info from Mantis: fredvs @fredvs
-
Reporter name:
Original Reporter info from Mantis: fredvs @fredvs
- Reporter name:
Description:
Trying to compile a fpGUI unit into a library in Linux 64 bit:
Get that error message :
/usr/bin/ld: /home/fred/mylib/lib/x86_64-linux/thefile.o: réadressage de
R_X86_64_32S en vertu de « .bss.n_u_thefile_
$_usedfirstmessage » cannot
be used when creation of shared object, recompile with -fPIC/home
/fred/fmylib/lib/x86_64-linux/thefile.o: error adding symbols: Bad value
Steps to reproduce:
This unit is part of the fpGUI project :
Units/Project => https://github.com/graemeg/fpGUI/tree/develop
Download it by Clicking on "Download ZIP".
Then in /fpGUI/src/corelib/
Try to compile that simple library with Linux 64 bit :
library fpGUI;
uses
fpg_main; => error while compiling on Linux 64 bit.
begin>> end.
Compiler parameters (need path of fpGUI too) :
-MObjFPC -Scghi -CX -Os1 -Xs -XX -vewnhi -fPIC -Fu
PS : It compile and work perfect with Windows 32/64 and Linux 32...
Mantis conversion info:
- Mantis ID: 25901
- OS: linux
- Platform: 64 bit
- Version: 2.6.2