Need help with linker error
Andreas Pakulat
apaku at gmx.de
Sun Apr 5 20:36:58 UTC 2009
On 05.04.09 21:50:17, Milian Wolff wrote:
> Hi guys!
>
> I just stumbled upon an error I cannot resolve...
>
> I can't use any functions (note: not methods, plain functions!) from
> php/duchain/helper.h inside completion/context.cpp...
>
> I've added helper.h as an #include yet the linker complains about an undefined
> reference...
>
> The library (i.e. the cmake target) containing helper.cpp is definitly linked
> to. What I think the error is:
>
> objdump -t libkdev4phpduchain.so | grep -i findDeclarationImport
> 0006275d l F .text 00000a5a .hidden
> _ZN3Php27findDeclarationImportHelperEPN8KDevelop9DUContextENS0_19QualifiedIdentifierENS_15DeclarationTypeEPNS_7AstNodeEPNS_16EditorIntegratorE
>
> Note the .hidden - how can I remove that? I tried the KDEVPHPDUCHAIN_EXPORT
> makro on the function but only get
>
> In file included from
> /home/milian/projects/kde4/php/duchain/includebuilder.cpp:23:
> /home/milian/projects/kde4/php/duchain/helper.h:50: warning: ‘visibility’
> attribute ignored on non-class types
>
> So I'm lost... What do I have to do to get that function workin in other
> places?
You definetly need to add the export macro, how did you add that? The
line should be:
KDEVPHPDUCHAIN_EXPORT KDevelop::Declaration* findDeclarationImportHelper(KDevelop::DUContext* currentContext,
After that the symbol shouldn't be hidden anymore, the error message
from gcc suggests that you added it at the end or something (at least
here line 50 is the last line of the method).
Andreas
--
You'll be called to a post requiring ability in handling groups of people.
More information about the KDevelop-devel
mailing list