On 11.02.12 22:34:32, Michał Walenciak wrote: > > Hi all > > > today I've encountered problem with using kde stuff in my program. > When I simply added find_package(KDE4) it just stopped linking. > > I think it's probably related to this post: > http://forum.kde.org/viewtopic.php?f=64&t=89265 > > I've two questions: > 1. what find_package(KDE4) has changed, so program which was compiling and > linking successfully stopped linking?
In the above forum post the reason for getting those undefined references is that KDE4 enables symbol visibility for gcc, i.e. symbols are hidden by default unless you explicitly make them visible via an export-macro. This is important when linking to lots of libraries as it reduces the startup time of applications. I have no idea what the problem in your case is, as you provided no information. > 2. why find_package(KDE4) is forcing it's own compiler flags (like additional > -Wxxx I don't see why any warning would be bad, unless gcc detects false-positives. But also see below. > or -O2 in DEBUG build)? I don't know, you may be able to find information about that in some old archives of kde-core-devel. I guess this stems from pre-cmake times, since even with automake in KDE3 debug was -O2 -g to provide debuggable executables that still had some optimizations so they could be used for normal usage too. > I can agree, that ${KDE_xxxx} variables can be > put around to influence on some compiler flags, but simple "find_package" > IMHO > should not do such things. Please feel free to bring that up on the kde-buildsystem list, which would be the right place to discuss the KDE4 cmake module. Andreas >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<