[Qt-interest] QLibrary cannot resolve symbol

Thiago Macieira thiago at kde.org
Wed Jul 13 19:29:28 CEST 2011


On Wednesday, 13 de July de 2011 18:37:43 Anatoly Burakov wrote:
> Hi all
> 
> I'm trying to load a shared library using QLibrary. I done it a
> million times before, so i know all the basics. However, for some
> reason, this time it doesn't work.
> 
> I have an exported C "instance" function. The output from readelf is
> the following:
> $ readelf -s libmylib.so | grep instance
>    180: 0000000000002e70    61 FUNC    LOCAL  DEFAULT   11 instance

Please add the -D switch to the readelf command.

In any case, note the "Bind" type LOCAL. It means it's not a global symbol, it 
cannot be found outside its original .c or .cpp. You need to remove the 
"static" keyword.

> When i try to resolve it with QLibrary but it says it can't resolve
> this symbol. I also tried doing everything through QPluginLoader -
> same thing, the library is not a valid plugin.
> 
> What could be the reason? KDevelop 4.2.3, latest Kubuntu x64.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110713/a87335a0/attachment.bin 


More information about the Qt-interest-old mailing list