The 'void timetrace(const char *txt)' function is defined in main.cpp so you obviously have no way to link to it since that file gets linked in the application binary. If you really need to link the plugin to libraries containing UI elements like 'dialogs widgets' you need to create a definition for 'void timetrace(const char *txt)' in the plugin.
Hope that helps, Regards, Cristian P.S. this is one of those things in KMyMoney that needs a better solution :) 2013/3/21 aga <agande...@gmail.com>: > I'm working on a new plugin, for CSV export. As I'd based it on > mymoneyqifwriter.cpp, which I'd recently worked on, and without too > much thought, I built it in kmymoney/kmymoney/converter/ and had it > working nicely, with just some tidying up to do, or so I thought. > > Then I moved it all to kmymoney/kmymoney/plugins and had to sort out > several undefined reference problems. I now am getting the following > error and am a bit stuck on what's needed. > " > ../../../lib/libwidgets.a(register.cpp.o): In function > `KMyMoneyRegister::Register::updateRegister(bool)': > /home/aga/Git/kmymoney/kmymoney/widgets/register.cpp:943: > undefined reference to `timetrace(char const*)' " > > In desperation, I googled and found an exchange between Michael > Edwardes and Cristian in 2010, but that didn't seem relevant as it > involved building qtdesigner widgets plugin, which I'm not doing. > > This is what I now have included in my CMakeLists.txt - > "..... > TARGET_LINK_LIBRARIES(kmm_csvexport > kmm_mymoney kmm_plugin > ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} > ${GMP_LIBRARIES} > ${LIBALKIMIA_LIBRARY} kmymoney_common dialogs widgets models kmm_config > )..... > " > > Can anyone help dig me out please? Many thanks > > Allan > _______________________________________________ > KMyMoney-devel mailing list > KMyMoney-devel@kde.org > https://mail.kde.org/mailman/listinfo/kmymoney-devel _______________________________________________ KMyMoney-devel mailing list KMyMoney-devel@kde.org https://mail.kde.org/mailman/listinfo/kmymoney-devel