[Lazarus] Dynamic library dependency error

xrfang xrfang at gmail.com
Tue Jan 22 16:14:40 CET 2013


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?

Thanks,
Shannon


在 二, 1月 22, 2013 at 10:41 下午,Howard Page-Clark <hdpc at talktalk.net> 写道:
On 22/1/13 2:22, xrfang wrote: 

> I try to make a dynamic library and get this error: 
> 
> paintrect.pas(0,0) Fatal: Can not find unit Controls used by paintrect. 
> Check if package LCLBase is in the dependencies. 

You need to add LCLBase as a project dependency. 
Use the Project Inspector's Add button to show the Add to Project dialog. 
Project -> Project Inspector, 
then in the Project Inspector click the middle tab to open the New Requirement page, and in the Package Name combo dropdown choose LCLBase from the long list presented. 
Then click the [Create New Requirement] button, and you're done - the new package requirement will be listed under Required Packages node in the Project Inspector.

-- 
_______________________________________________ 
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/20130122/8799d15d/attachment-0003.html>


More information about the Lazarus mailing list