Пытаюсь скомпилировать библиотеку, содержащую юнит Controls.
Ругань компилятора:
- Код: Выделить всё
# fpc ./project1.lpr -fPIC -Rintel -MObjFPC -Schi -CX -CirtR -O1 -OoREGVAR -g -gl -gh -Xg -Xs -XX -vewnhi @/etc/fpc.cfg -Filib/x86_64-linux -Fl/opt/gnome/lib -Fu../ -Fu/usr/share/lazarus/1.0.14/lcl/units/x86_64-linux/gtk2 -Fu/usr/share/lazarus/1.0.14/lcl/units/x86_64-linux -Fu/usr/share/lazarus/1.0.14/components/lazutils/lib/x86_64-linux -Fu/usr/share/lazarus/1.0.14/packager/units/x86_64-linux -Fu. -FUlib/x86_64-linux/ -l -olibproject1.so -dLCL -dLCLgtk2
Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Note: DWARF debug information cannot be used with smart linking on this target, switching to static linking
Free Pascal Compiler version 2.6.2-5 [2013/07/25] for x86_64
Copyright (c) 1993-2012 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling ./project1.lpr
Compiling resource lib/x86_64-linux/project1.or
Linking libproject1.so
/usr/bin/ld.bfd: warning: link.res contains output sections; did you forget -T?
/usr/bin/ld.bfd: /usr/share/lazarus/1.0.14/lcl/units/x86_64-linux/controls.o: перемещение R_X86_64_32S для «.data» не может использоваться при создании общего объекта; перекомпилируйте с -fPIC
/usr/share/lazarus/1.0.14/lcl/units/x86_64-linux/controls.o: error adding symbols: Некорректное значение
project1.lpr(21) Error: Error while linking
project1.lpr(21) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode (normal if you did not specify a source file to be compiled)
Компилировать с -fPIC пробовал, -WR не знает параметра. Под win7 вполне компилировалось. Помогите люди добрые. Недобрые тоже помогите)