Unable to use KDevelop::Path

Milian Wolff mail at milianw.de
Tue Feb 4 17:03:52 UTC 2014


On Tuesday 04 February 2014 11:24:50 Todd Nowacki wrote:
> Hi,

Hey Todd,

> I'm currently trying to get a fix for
> https://bugs.kde.org/show_bug.cgi?id=321982.
> 
> Right now, I'm trying to create a KUrl from a Path and I'm getting the
> error "undefined reference to 'KDevelop::Path::toUrl() const'", any advice?
> Someone on irc suggested making sure that I uninstalled all traces of
> kdevelop / kdevplatform from my package manager; I have done that but no
> luck.

Indeed, it works for all of us so something fishy is going on. Make sure 
nothing is installed, i.e. do a "find" in /usr on some pattern like 
"libkdev*". Since you are building kdevplatform, nothing should exist yet. 
Then make sure you have a lib/libkdevplatformproject.so which points to the 
...project.so.8.0.0 version in your build folder. You can check whether that 
has the symbols it should have by doing something similar to:

nm path/to/buildfolder/lib/libkdevplatformproject.so | c++filt | grep 
Path::toUrl
0000000000048648 T KDevelop::Path::toUrl() const

> I'm assuming that this is some sort of build dependency error, given that
> the error is occurring during linking, but I'm not sure how to fix it. The
> full error is as follows:
> 
> Building CXX object
> outputview/CMakeFiles/kdevplatformoutputview.dir/outputfilteringstrategies.c
> pp.o Linking CXX shared library ../lib/libkdevplatformoutputview.so
> CMakeFiles/kdevplatformoutputview.dir/outputfilteringstrategies.cpp.o: In
> function `KDevelop::CompilerFilterStrategy::errorInLine(QString const&)':
> /home/tmn/src/kdevplatform/outputview/outputfilteringstrategies.cpp:283:
> undefined reference to `KDevelop::Path::pathOrUrl() const'
> /home/tmn/src/kdevplatform/outputview/outputfilteringstrategies.cpp:286:
> undefined reference to `KDevelop::Path::toUrl() const'
> collect2: error: ld returned 1 exit status

Try to run make VERBOSE=1 -j1 from the command line and take a look at the 
explicit linker line and paste it here. For me it explicitly lists -
L/ssd/milian/projects/.build/kde4/kdevplatform/lib which is my build folder's 
lib output path and thus that should take precedence over anything else.

Bye

-- 
Milian Wolff
mail at milianw.de
http://milianw.de


More information about the KDevelop-devel mailing list