On Thu, 21 Mar 2013 14:06:45 +0200 Cristian Oneț <onet.crist...@gmail.com> wrote:
> 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 :) Thanks Cristian. I'd seen that is was defined in main.cpp, and hadn't twigged that it wouldn't be accessible from a plugin. I should have, as I remember stumbling into something similar a while back. To be sure I understand what you're saying, I need to copy that 'void timetrace(const char *txt)' into the plugin so that it is accessible? < If you really need to link the plugin to > libraries containing UI elements like 'dialogs widgets I had to add those because of the other linking problems I encountered on the relocation of the plugin. Does that suggest that really, those errors should be resolved in a similar way? Oh, dear. Allan > 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