[Lazarus] Dynamic library dependency error
Xiangrong Fang
xrfang at gmail.com
Wed Jan 23 08:58:00 CET 2013
Thanks, I added -fPIC and it worked, it seems no need to add -dFPC_PIC?
Also I found a small problem. While create a new shared library and
compile fpc always complain that -WR is invalid. I have to uncheck
"Relocatable" option to fix this.
I think this is a bug in lazarus project template, what do you think?
2013/1/23 Antonio Fortuny <a.fortuny at sitasoftware.lu>
>
>
> Le 22/01/2013 16:14, xrfang a écrit :
>
>> Hi Howard,
>>
>> Thanks for your info. Â After adding LCLBase to dependencies, I get these
>> errors:
>>
>>
>> /usr/bin/ld: warning: link.res contains output sections; did you forget
>> -T?
>> /usr/bin/ld: /home/xrfang/Desktop/**paintrect/lib/x86_64-linux/**paintrect.o:
>> relocation R_X86_64_32S against `_$PAINTRECT$_Ld1' can not be used when
>> making a shared object; recompile with -fPIC
>> /home/xrfang/Desktop/**paintrect/lib/x86_64-linux/**paintrect.o: æ—
>> æ³•è¯»å –ç¬¦å ·: 错误的值
>>
>> liboval.lpr(14) Error: Error while linking
>>
>> where "æ— æ³•è¯»å –ç¬¦å ·: 错误的值" means "cannot read symbol:
>> illegal value".
>>
>> What's wrong here?
>>
>> Try adding
> -fPIC
> -dFPC_PIC
> into program's options, Other section
> Tha's what I use when building shared libraries.
>
> Antonio.
>
>
>
>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130123/6b328cfb/attachment-0003.html>
More information about the Lazarus
mailing list