ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to use the DCOP interface, but there are some undefined references during the linking stage which I haven't been able to fix so far:
The error output
Code:
g++ -I/usr/include/kde -I/usr/share/qt3/include -I/usr/share/qt3/lib -I/usr/X11R6/include -I/usr/X11R6/lib -c queuehandler.cpp -o queuehandler.o
g++ -L/usr/lib -L/usr/share/qt3/lib -L/usr/X11R6/lib -lkdecore -lkdeui -lkio -lqt-mt -lXext -lX11 -o main main.o queuehandler.o
queuehandler.o(.gnu.linkonce.r._ZTV12QueueHandler+0x28): undefined reference to `DCOPIface::process(QCString const&, QMemArray<char> const&, QCString&, QMemArray<char>&)'
queuehandler.o(.gnu.linkonce.r._ZTV12QueueHandler+0x2c): undefined reference to `DCOPIface::functions()'
queuehandler.o(.gnu.linkonce.r._ZTV12QueueHandler+0x30): undefined reference to `DCOPIface::interfaces()'
queuehandler.o(.gnu.linkonce.r._ZTV12QueueHandler+0x64): undefined reference to `virtual thunk [v:0,-16] to DCOPIface::process(QCString const&, QMemArray<char> const&, QCString&, QMemArray<char>&)'
queuehandler.o(.gnu.linkonce.r._ZTV12QueueHandler+0x74): undefined reference to `virtual thunk [v:0,-32] to DCOPIface::interfaces()'
queuehandler.o(.gnu.linkonce.r._ZTV12QueueHandler+0x78): undefined reference to `virtual thunk [v:0,-36] to DCOPIface::functions()'
queuehandler.o(.gnu.linkonce.r._ZTC12QueueHandler0_9DCOPIface+0x18): undefined reference to `typeinfo for DCOPIface'
queuehandler.o(.gnu.linkonce.r._ZTC12QueueHandler0_9DCOPIface+0x24): undefined reference to `DCOPIface::process(QCString const&, QMemArray<char> const&, QCString&, QMemArray<char>&)'
queuehandler.o(.gnu.linkonce.r._ZTC12QueueHandler0_9DCOPIface+0x28): undefined reference to `DCOPIface::functions()'
queuehandler.o(.gnu.linkonce.r._ZTC12QueueHandler0_9DCOPIface+0x2c): undefined reference to `DCOPIface::interfaces()'
queuehandler.o(.gnu.linkonce.r._ZTC12QueueHandler0_9DCOPIface+0x54): undefined reference to `typeinfo for DCOPIface'
queuehandler.o(.gnu.linkonce.r._ZTC12QueueHandler0_9DCOPIface+0x60): undefined reference to `virtual thunk [v:0,-16] to DCOPIface::process(QCString const&, QMemArray<char> const&, QCString&, QMemArray<char>&)'
queuehandler.o(.gnu.linkonce.r._ZTC12QueueHandler0_9DCOPIface+0x70): undefined reference to `virtual thunk [v:0,-32] to DCOPIface::interfaces()'
queuehandler.o(.gnu.linkonce.r._ZTC12QueueHandler0_9DCOPIface+0x74): undefined reference to `virtual thunk [v:0,-36] to DCOPIface::functions()'
queuehandler.o(.gnu.linkonce.t._ZN9DCOPIfaceD0Ev+0xa): In function `DCOPIface::~DCOPIface [in-charge deleting]()':
: undefined reference to `vtable for DCOPIface'
queuehandler.o(.gnu.linkonce.t._ZN9DCOPIfaceD0Ev+0x19): In function `DCOPIface::~DCOPIface [in-charge deleting]()':
: undefined reference to `vtable for DCOPIface'
queuehandler.o(.gnu.linkonce.t._ZN9DCOPIfaceD1Ev+0xa): In function `DCOPIface::~DCOPIface [in-charge]()':
: undefined reference to `vtable for DCOPIface'
queuehandler.o(.gnu.linkonce.t._ZN9DCOPIfaceD1Ev+0x19): In function `DCOPIface::~DCOPIface [in-charge]()':
: undefined reference to `vtable for DCOPIface'
queuehandler.o(.gnu.linkonce.r._ZTI12QueueHandler+0x10): undefined reference to `typeinfo for DCOPIface'
collect2: ld returned 1 exit status
make: *** [main] Error 1
My basic DCOPIface class (only used to send)
Code:
#ifndef DCOPIFACE_H
#define DCOPIFACE_H
#include <dcopobject.h>
class DCOPIface : virtual public DCOPObject
{
K_DCOP
k_dcop:
};
#endif
I've also read several tutorials, but no answer there... May be a silly question, but what's a .skel file for? Never heard of those before (I'm a starting Linux developer ), although I've seen the term pop up (also in the tutorial you linked to).
The skel file is created automatically by dcopidl when it processes the DCOP interface definition.
The best way to create KDE apps is to use the Automake setup provided for KDE, either in the kdesdk module, or through KDevelop.
This will setup the moc, and most of the libs for you. It means your only having to work on a Makefile.am rather than writing your own
makefiles, and configuration. Plus stuff like processing dcopidl will work rather easily. A couple of links for you:
Well, I guess I'll have to do some more reading and experimenting then
On the other hand, there's a simple reason why I've made my own makefile; I don't like working with KDevelop. Hence I'd still like to find out how to get this to work (by hand).
In any case, thanks for the links. I'll check them out asap and stuff the info in some braincells!.
I'd still recommend getting the kdesdk, with the Makefile and configuration scripts ( and basic templates for KDE porgrams ), it will make your life a lot easier.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.