[OE-core] Linker error while cross compiling, (Qt issue?)

Samuel Stirtzel s.stirtzel at googlemail.com
Thu Feb 23 07:27:22 UTC 2012


2012/2/22 Otavio Salvador <otavio at ossystems.com.br>:
> On Wed, Feb 22, 2012 at 14:06, Samuel Stirtzel
> <s.stirtzel at googlemail.com> wrote:
>> 2012/2/22 Otavio Salvador <otavio at ossystems.com.br>:
>>> On Wed, Feb 22, 2012 at 13:53, Samuel Stirtzel
>>> <s.stirtzel at googlemail.com> wrote:
>>>> This error really puzzles me, usually I would assume that a library
>>>> has no problems to export symbols.
>>>
>>> It puzzles me as well;  I have many applications and libraries linking
>>> against Qt without problem is my first advice is to check the build
>>> system of libdbusmenu-qt and check if it has any linking blackmagic or
>>> something like that.
>>
>> It looks like the "usual" linking magic:
>> http://gitorious.org/dbusmenu/dbusmenu-qt/blobs/master/src/dbusmenu_export.h
>> "dbusmenu_qt_EXPORTS" is defined at compile time and classes are
>> exported e.g. "class DBUSMENU_EXPORT DBusMenuExporter : public
>> QObject".
>
> http://gitorious.org/dbusmenu/dbusmenu-qt/blobs/master/src/CMakeLists.txt#line7
>
> This might be related. I didn't try but might be a failure in the way
> of the code is exporting it.

Yes that helped me, I've seen the visibility=hidden before, but didn't
thought about that the code _could_ export it wrong.
So adding  __attribute__((visibility("default")))  to the
dbusmenu_export.h solves this issue.

It is still odd that this only occurs while cross compiling.
More odd seems that the same error happens to Soprano, it also uses
Q_DECL_EXPORT [1].

[1] http://quickgit.kde.org/index.php?p=soprano.git&a=blob_plain&h=7496feb29efea05cca47d919ce6060670634df32&f=soprano%2Fsoprano_export.h
-- 
Regards
Samuel




More information about the Openembedded-core mailing list