[Kmymoney-devel] Building using kdepimlibs

Thomas Baumgart thb at net-bembel.de
Sat Jan 2 13:17:45 CET 2010


On Saturday 02 January 2010 05:17:47 Ian Neal wrote:
>   Alvaro Soliverez wrote:
> > On Fri, Jan 1, 2010 at 9:54 PM, Ian Neal<iann_bugzilla at blueyonder.co.uk>  
wrote:
> >>   Hi,
> >>
> >> I noticed that we already have in CMakeLists.txt:
> >> find_package(KdepimLibs REQUIRED)
> >>
> >> but what else do I need to add and to where so that files further down
> >> in the tree know what to do with:
> >> #include<KHolidays/Holidays>
> >>
> >> I have tried adding ${KDEPIM_DEFINITIONS} to add_definitions and
> >> ${KDEPIMLIBS_INCLUDE_DIRS} to include_directories in CMakeLists.txt but
> >> I still get, when building, errors similar to:
> >> undefined reference to `KHolidays::HolidayRegion::locations()
> >
> > Hello Ian,
> > are you sure that class is available in the KDE version you are using?
> > The KDE PIM libraries seem to be rather unstable lately. We are having
> > such a problem with libkleo at the moment.
>
> Yes, well at least it looks like it is available under
> /usr/include/kde4/kholidays/holidays.h on my system, I am on KDE 4.3.4.

Same here (the file can be found as /usr/include/kholidays/holidays.h on 
openSuSE 11.1)

The error message though leads to a link problem. Compilation seems to be ok, 
but you need to specify the library in which the actual code is contained 
during the link phase. So you might need to change

  TARGET_LINK_LIBRARIES(kmymoney_common
    ${QT_AND_KDECORE_LIBS} kmm_mymoney)

into

  TARGET_LINK_LIBRARIES(kmymoney_common
    ${QT_AND_KDECORE_LIBS} kholidays kmm_mymoney)

in kmymoney/CMakeLists.txt so that the library will be searched and 
referenced. YMMV.

-- 

Regards

Thomas Baumgart

GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
-------------------------------------------------------------
'Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.' - Brian W. Kernighan
-------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 224 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kmymoney-devel/attachments/20100102/22cbc46b/attachment.sig 


More information about the KMyMoney-devel mailing list