discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linking problems with gcc 4.6.1 and GNUstep trunk


From: Philippe Roussel
Subject: Re: Linking problems with gcc 4.6.1 and GNUstep trunk
Date: Tue, 21 Feb 2012 09:38:59 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

Hi Wolfgang

Le 21/02/2012 09:29, Wolfgang Lux a écrit :

[snip]

Is this a problem in gnustep-make, gcc, the makefile ?

I would say this is the expected behavior. The XXX_LDFLAGS variables are 
supposed to provide library paths, i.e., -L options, but not libraries 
themselves, i.e., -l options. These should be provided via a XXX_LIBS flags 
(and if I'm not mistaken adserver_LIBS should do the job). The reason for this 
separation is that for many linkers the order of arguments on the command line 
matters. The problem with the initial version of your Makefile is that 
-lAddresses appeared before ./obj/adserver.obj/adserver.m.o on the command line 
and hence the library wasn't used to resolve undefined references in the object 
file. The second version of the makefile gets the order of arguments right, 
i.e., -LAddresses appears after ./obj/adserver.obj/adserver.m.o in the link 
command line.

Thank you for this explanation. It could possibly be less fragile if all LDFLAGS and LIBS variables were appended at the end of the command line, after all objects files ?

adserver_LIBS doesn't work but adserver_TOOL_LIBS does, that should do the trick.

Thanks again,
Philippe



reply via email to

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