[Kmymoney-devel] Building using kdepimlibs

Ian Neal iann_bugzilla at blueyonder.co.uk
Sat Jan 2 14:18:19 CET 2010


  Thomas Baumgart wrote:
> 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.
>
Yes, that fixed it. Thanks.

Ian



More information about the KMyMoney-devel mailing list