Lazarus

Using the Lazarus IDE => General => Topic started by: Elphi on September 20, 2007, 05:47:02 pm

Title: Linking error, but what does it mean?
Post by: Elphi on September 20, 2007, 05:47:02 pm
I get the following error messages:
Code: [Select]

ydafbudf.lpr(34,1) Fatal: There were 1 errors compiling module, stopping
ydafbudf.lpr(34,1) Error: Error while linking
/mnt/y/y-invent/trunk/common/ylib.o: could not read symbols: Bad value
/usr/bin/ld: /mnt/y/y-invent/trunk/common/ylib.o: relocation R_X86_64_32S against `TC_SYSUTILS_DEFAULTFORMATSETTINGS' can not be used when making a shared object; recompile with -fPIC


What does it mean? Where can I set -fPIC?

BTW, is it a bug that the order of messages is reversed when 'copying selected messages to clipboard'?
Title: RE: Linking error, but what does it mean?
Post by: Marc on September 20, 2007, 05:55:38 pm
what compiler options are you using (or better what are you trying ?)
Title: Linking error, but what does it mean?
Post by: Elphi on September 20, 2007, 06:20:34 pm
Installed FPC 2.2.0 for x86_64 Linux and Lazarus 0.9.23 beta for x86_64 Linux on CentOS 5. I want to build a 64 bits so (containing UDFs for use with Firebird). I didn't change default Lazarus/FPC settings (yet).
Title: Linking error, but what does it mean?
Post by: Almindor on September 21, 2007, 11:30:12 am
You're making a library/.so somehow? That's not exactly supported on unix. You can make them by using ppumove tho.
Title: Linking error, but what does it mean?
Post by: felipemdc on September 21, 2007, 11:49:33 am
Quote from: "Almindor2"
You're making a library/.so somehow? That's not exactly supported on unix. You can make them by using ppumove tho.


Building libraries (.so) is supported under Unix. Otherwise it would be impossible to build apache modules.

I would just obey the warning and put -fPIC on the Compiler Options dialog. There one can find a space for "Other options" or something similar.
Title: Linking error, but what does it mean?
Post by: Elphi on September 21, 2007, 10:45:21 pm
That worked, thanks; my first succesful build on linux!
TinyPortal © 2005-2018