LazReport and shared library
Original Reporter info from Mantis: silvioprog
-
Reporter name: silvioprog
Original Reporter info from Mantis: silvioprog
- Reporter name: silvioprog
Description:
Hello,
I'm trying to compile a .SO file, embeddeding a small report generator using LazReport, but it not compiles on Linux (Mint 14, GTK2, 64bit).
Attached, the project to reproduce the error.
This is the compile log:
===============================
Options changed, recompiling clean with -B
Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Error: Illegal parameter: -WR
===============================
If I disable -WR:
===============================
Options changed, recompiling clean with -B
Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 2.7.1 [2012/12/22] for x86_64
Copyright (c) 1993-2012 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling lr.lpr
Compiling unit1.pas
Compiling resource /home/brook/liblr/lib/x86_64-linux/lr.or
Linking liblr.so
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
/usr/bin/ld: /home/brook/lazarus/components/lazreport/source/lib/x86_64-linux/lr_class.o: relocation R_X86_64_32S against U_$LR_CLASS_$$_FRFUNCTIONSCOUNT' can not be used when making a shared object; recompile with -fPIC<br/> /home/brook/lazarus/components/lazreport/source/lib/x86_64-linux/lr_class.o: could not read symbols: Bad value<br/> lr.lpr(24) Error: Error while linking<br/> /usr/bin/ld: warning: link.res contains output sections; did you forget -T?<br/> /usr/bin/ld: /home/brook/lazarus/components/lazreport/source/lib/x86_64-linux/lr_class.o: relocation R_X86_64_32S against
U_LR_CLASS_
$_FRFUNCTIONSCOUNT' can not be used when making a shared object; recompile with -fPIC
/home/brook/lazarus/components/lazreport/source/lib/x86_64-linux/lr_class.o: could not read symbols: Bad value
lr.lpr(24) Error: Error while linking
lr.lpr(24) Fatal: There were 1 errors compiling module, stopping
===============================
Thank you!
Mantis conversion info:
- Mantis ID: 23760