kdevelop build error: undefined reference to `KDevelop::EditorContext::currentWord() const'

René J.V. Bertin rjvbertin at gmail.com
Sun Jun 26 07:18:17 UTC 2016

On Saturday June 25 2016 16:23:03 Aetf wrote:

>That's the only version of gcc I have right now. Arch Linux made the
>movement from 5.x series to 6.x recently and it's not easy to use a earlier
>version after that.

That' strange, for a distro that's supposed to be much more geared towards developers than Ubuntu. I just installed 6.1.1 on my Kubuntu 14.04 rig, and got rid of 4.7 =)
I'll be giving 6.1.1 a try later today, I was planning to see anyway if there's a real benefit to that version.

>But I can't find any rules in CMakeLists.txt that are changing visibility
>settings for test_gdb target, maybe it's somewhere in ecm_add_test?

I couldn't find anything like that either. Using a different (and non-default) visibility for building tests seems a bit odd to me but it might be for a reason.

I'm guessing the main reason why we need -fvisibility and the like is because someone thought it a good idea to reuse the static keyword to mean yet another thing when C++ was drafted. Its use as a flag that makes that local variables maintain their value between function invocations, makes variables and (non class) functions only accessible in the file in which they're defined (already a lot less clear what is static about that) is trivial to grasp from looking at the local source context. Giving it the additional feature to turns a method from an instance-specific method/variable into a class method/variable was IMHO a bad idea. I really don't see what's static about that; they're basically just regular functions that have direct access to certain variables. It wouldn't have been hard I think to introduce a different keyword, not even back in the day when C++ was implemented as a preprocessor.

>> But that wouldn't explain why EditorContext::currentWord() and the
>> EditorContext typeinfo are the only symbols concerned...
>No idea why is that either...

That could actually be simply because the file doesn't use anything else from EditorContext ...


More information about the KDevelop-devel mailing list