RE: [Inkscape-devel] Inkboard linking/dependencies
I've went ahead and included the extern lines: however, that's a different issue than what we were having. The undefined reference we have is to functions we wrote in inkboard.cpp. Here they are from the most recent attempt: dialogs/libspdialogs.a(InkboardMsg.o)(.text+0xa7a): In function `sp_inkBMsg_ObjectAddedChild': dialogs/InkboardMsg.cpp:436: undefined reference to `sendChange(char*)' dialogs/libspdialogs.a(InkboardMsg.o)(.text+0xc92): In function `sp_inkBMsg_ObjectRemovedChild': dialogs/InkboardMsg.cpp:519: undefined reference to `sendChange(char*)' dialogs/libspdialogs.a(InkboardMsg.o)(.text+0xe4d): In function `sp_inkBMsg_ObjectChanged': dialogs/InkboardMsg.cpp:624: undefined reference to `sendChange(char*)' dialogs/libspdialogs.a(inkboard-connect.o)(.text+0xa97): In function `sp_inkboardConnect_dialog_inkboardConnect(_GObject*, _GObject*)': dialogs/inkboard-connect.cpp:228: undefined reference to `connect_and_auth(char*, char*, char*)' dialogs/libspdialogs.a(inkboard-connect.o)(.text+0xacf):dialogs/inkboard -connect.cpp:238: undefined reference to `setRecipient(char const*)' dialogs/libspdialogs.a(inkboard-connect.o)(.text+0x138f): In function `sp_inkboardConnect_dialog_inkboardShareUser(_GObject*, _GObject*)': dialogs/inkboard-connect.cpp:393: undefined reference to `send_connect_request_to_user(char const*, char*)'
I suspect you didn't get that error when you checked out of the CVS. Line 8 of inkboard.cpp should be #include "dialogs/InkboardMsg.h" instead of #include "dialogs/InkboardMsg.cpp". I hesitate to upload that change since we've been following the convention of only committing changes after we ensure that it at least compiles.
For a reason I don't fully understand, including that .cpp somehow informs the linker of where our new functions are defined.
Thanks for the help on this. Steven
-----Original Message----- From: inkscape-devel-admin@lists.sourceforge.net [mailto:inkscape-devel-admin@lists.sourceforge.net] On Behalf Of Bryce Harrington Sent: Friday, February 04, 2005 1:43 AM To: Montgomery, Steven S Cc: inkscape-devel@lists.sourceforge.net Subject: RE: [Inkscape-devel] Inkboard linking/dependencies
On Thu, 3 Feb 2005, Montgomery, Steven S wrote:
No, we don't have our code linking normally. Since it was such a brickwall for our progress, we moved the Jabber code into a file we added under dialogs(where it was being called from). Obviously this links, but we definitely would like to separate the code back out how
it
should be.
I've seen some recent posts about automake 1.9 causing problems for
some
people. Perhaps that is our issue as well?
Okay, I think we got this one figured out tonight. Check out our discussion in today's jabber logs here:
http://inkscape.gristle.org/2005-02-03.txt
Basically, loudmouth is set up to link in C style but since Inkscape is C++, libs are linked in C++ style.
You can direct the linker to link the loudmouth functions in C style like this:
diff -p -u -r1.4 inkboard.h --- inkboard.h 3 Feb 2005 20:19:33 -0000 1.4 +++ inkboard.h 4 Feb 2005 06:21:55 -0000 @@ -1,7 +1,10 @@
//Inkboard.h
+extern "C" { #include <loudmouth/loudmouth.h> +}; + //#include "inkboard-TimedMessageNode.h"
#define TEST_RECEPTION 1
Bryce
------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
On Sat, 5 Feb 2005, Montgomery, Steven S wrote:
I've went ahead and included the extern lines: however, that's a different issue than what we were having. The undefined reference we have is to functions we wrote in inkboard.cpp. Here they are from the most recent attempt:
dialogs/libspdialogs.a(InkboardMsg.o)(.text+0xa7a): In function `sp_inkBMsg_ObjectAddedChild': dialogs/InkboardMsg.cpp:436: undefined reference to `sendChange(char*)' dialogs/libspdialogs.a(InkboardMsg.o)(.text+0xc92): In function `sp_inkBMsg_ObjectRemovedChild': dialogs/InkboardMsg.cpp:519: undefined reference to `sendChange(char*)' dialogs/libspdialogs.a(InkboardMsg.o)(.text+0xe4d): In function `sp_inkBMsg_ObjectChanged': dialogs/InkboardMsg.cpp:624: undefined reference to `sendChange(char*)' dialogs/libspdialogs.a(inkboard-connect.o)(.text+0xa97): In function `sp_inkboardConnect_dialog_inkboardConnect(_GObject*, _GObject*)': dialogs/inkboard-connect.cpp:228: undefined reference to `connect_and_auth(char*, char*, char*)' dialogs/libspdialogs.a(inkboard-connect.o)(.text+0xacf):dialogs/inkboard -connect.cpp:238: undefined reference to `setRecipient(char const*)' dialogs/libspdialogs.a(inkboard-connect.o)(.text+0x138f): In function `sp_inkboardConnect_dialog_inkboardShareUser(_GObject*, _GObject*)': dialogs/inkboard-connect.cpp:393: undefined reference to `send_connect_request_to_user(char const*, char*)'
I suspect you didn't get that error when you checked out of the CVS. Line 8 of inkboard.cpp should be #include "dialogs/InkboardMsg.h" instead of #include "dialogs/InkboardMsg.cpp". I hesitate to upload that change since we've been following the convention of only committing changes after we ensure that it at least compiles.
For a reason I don't fully understand, including that .cpp somehow informs the linker of where our new functions are defined.
Well, by including the .cpp you essentially are pasting the contents of that file in, so it's getting the full definition of all the functions. However, having multiple definitions of functions in your binary will cause trouble later, so we should solve the problem more directly...
Try this. Move your two main files to the inkpost.a section, i.e.:
libinkpost_a_SOURCES = \ ... inkboard.cpp inkboard.h \
This forces those objects to be compiled last in the link chain, so if link ordering is the issue, this might fix it.
Bryce
participants (2)
-
Bryce Harrington
-
Montgomery, Steven S