Unable to use KDevelop::Path

Kevin Funk kfunk at kde.org
Tue Feb 4 18:59:04 UTC 2014


Am Dienstag, 4. Februar 2014, 11:24:50 schrieb Todd Nowacki:
> Hi,
> 
> 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.
> 
> 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
> 
> 
> Thanks!
> 
> -Todd Nowacki

You need to link kdevplatformoutputview against kdevplatformproject in case 
you want to use the Path class here.

Add 'kdevplatformproject' to the list of link libraries for the 
kdevplatformoutputview target, see outputview/CMakeLists.txt

@Milian, probably makes sense to move Path to a more generic location (util, 
maybe)? Currently it has a dependency on IndexedString, though.

Greets

-- 
Kevin Funk


More information about the KDevelop-devel mailing list