Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2004:
[Freeciv-Dev] Re: Failing to link with a QPE client -- any hints?
Home

[Freeciv-Dev] Re: Failing to link with a QPE client -- any hints?

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Frederic Briere <fbriere@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Failing to link with a QPE client -- any hints?
From: Jason Dorje Short <jdorje@xxxxxxxxxxxx>
Date: Mon, 19 Apr 2004 23:39:37 -0400

Frederic Briere wrote:

What's got me stumped is that all timer functions are actually there in
libcivcommon.a; it seems that linking against gui-qpe/libguiclient.a
(the client I'm trying to merge in) somehow prevents the linker from
seeing the timer functions.  I checked, and there are no functions with
the same name in the gui-qpe tree.

It's a problem in the linking stage.

I've run into this before, and I don't know why it happens. The order of the list of .a files seems to matter, so one .a file must come before another so that its functions may be used by that object file (or perhaps vice versa). You can see I don't really understand the problem :-).

The workaround is generally to list these .a files twice. This is already done for some .a files, but not all (this is done for civserver as well as civclient).

Try this patch.

Perhaps someone can find some documentation on this somewhere? How is it supposed to be done?

jason
Index: client/Makefile.am
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/Makefile.am,v
retrieving revision 1.55
diff -u -r1.55 Makefile.am
--- client/Makefile.am  19 Apr 2004 17:24:16 -0000      1.55
+++ client/Makefile.am  20 Apr 2004 03:40:04 -0000
@@ -191,7 +191,11 @@
        ../common/libcivcommon.a agents/libagents.a \
         ../common/aicore/libaicore.a
 
-civclient_LDADD        = @gui_sources@/libguiclient.a \
-       @INTLLIBS@ ../common/aicore/libaicore.a \
-        ../common/libcivcommon.a agents/libagents.a 
../common/aicore/libaicore.a \
+OBJECT_LIBS = @gui_sources@/libguiclient.a     \
+               ../common/libcivcommon.a        \
+               agents/libagents.a              \
+               ../common/aicore/libaicore.a
+
+civclient_LDADD        = $(OBJECT_LIBS) \
+       @INTLLIBS@ $(OBJECT_LIBS)       \
        @CLIENT_LIBS@ @SOUND_LIBS@

[Prev in Thread] Current Thread [Next in Thread]