Wrong order of -L?

Brad King brad.king at kitware.com
Mon Apr 17 17:21:20 CEST 2006


Alexander Dymo wrote:
> I've noticed this when compiling kdevelop today.
> We have -L<KDE installation directory> listed first in the compiler command
> line. This leads to link errors because wrong libraries are picked up.
> It links old installed libraries and not newer ones from the source tree.
> 
> In kdevelop/src/CMakeLists.txt we have
> ...
> target_link_libraries(kdevshell ${KDE4_KDECORE_LIBS} kdeui profileengine 
> kdevinterfaces kdevutil kdevwidgets newui khtml ktexteditor)
> ..
> 
> And when libkdevwidgets.so from build dir contains new symbols, the link
> ends with an error:
> 
> /usr/bin/c++  ... -L/home/gremlin/bin/kde4/lib 
> -L/home/gremlin/projects/oss/kde_svn/trunk/kdevelop_build/lib ... -lkdecore 
> -lkdeui -lprofileengine -lkdevinterfaces -lkdevutil -lkdevwidgets -lnewui 
> -lkhtml -lktexteditor -lkdevinterfaces ...
> ...
> undefined reference to ...
> 
> The error is because of the wrong order of -L parameters. 
> -L/home/gremlin/bin/kde4/lib should go after -L pathes to the build dir.
> 
> Can the order be changed somehow?

This has been fixed in CVS CMake since the last KDE release.

-Brad


More information about the Kde-buildsystem mailing list