discuss-gnustep
[Top][All Lists]
Advanced

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

Linking problems with gcc 4.6.1 and GNUstep trunk


From: Philippe Roussel
Subject: Linking problems with gcc 4.6.1 and GNUstep trunk
Date: Mon, 20 Feb 2012 23:00:37 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

Hi,

Using gcc 4.6.1, the GNU runtime and GNUstep trunk I get this when building for example gap/system-apps/Addresses/Goodies/adserver :

This is gnustep-make 2.6.2. Type 'make print-gnustep-make-help' for help.
Making all for tool adserver...
 Linking tool adserver ...
./obj/adserver.obj/adserver.m.o:(.data.rel+0x10): undefined reference to 
`__objc_class_name_ADPublicAddressBook'
./obj/adserver.obj/adserver.m.o:(.data.rel+0x30): undefined reference to 
`__objc_class_name_ADLocalAddressBook'
collect2: ld a retourné 1 code d'état d'exécution
make[3]: *** [obj/adserver] Erreur 1
make[2]: *** [internal-tool-all_] Erreur 2
make[1]: *** [adserver.all.tool.variables] Erreur 2
make: *** [internal-all] Erreur 2

GNUmakefile

include $(GNUSTEP_MAKEFILES)/common.make

TOOL_NAME=adserver

adserver_OBJC_FILES=adserver.m
adserver_OBJCFLAGS=-I../Frameworks -Wall
adserver_LDFLAGS=\
        -L../Frameworks/Addresses/Addresses.framework/Versions/A     \
        -lAddresses
-include GNUmakefile.preamble
-include GNUmakefile.local
include $(GNUSTEP_MAKEFILES)/tool.make
-include GNUmakefile.postamble

Linking command

gcc  -rdynamic -L../Frameworks/Addresses/Addresses.framework/Versions/A 
-lAddresses     -pthread -shared-libgcc -fexceptions -fgnu-runtime -o 
obj/adserver \
                ./obj/adserver.obj/adserver.m.o \
                     -L/home/philou/GNUstep/Library/Libraries 
-L/opt/GNUstep-trunk/Local/Library/Libraries 
-L/opt/GNUstep-trunk/System/Library/Libraries     -lgnustep-base   -lpthread 
-lobjc   -lm

If I modify the makefile like this

--- GNUmakefile 1 May 2007 23:08:38 -0000       1.1
+++ GNUmakefile 20 Feb 2012 21:57:05 -0000
@@ -5,8 +5,8 @@
 adserver_OBJC_FILES=adserver.m
 adserver_OBJCFLAGS=-I../Frameworks -Wall
 adserver_LDFLAGS=\
-       -L../Frameworks/Addresses/Addresses.framework/Versions/A     \
-       -lAddresses
+       -L../Frameworks/Addresses/Addresses.framework/Versions/A
+ADDITIONAL_TOOL_LIBS+=-lAddresses
 -include GNUmakefile.preamble
 -include GNUmakefile.local
 include $(GNUSTEP_MAKEFILES)/tool.make

it all works and the linking command is

gcc  -rdynamic -L../Frameworks/Addresses/Addresses.framework/Versions/A     
-pthread -shared-libgcc -fexceptions -fgnu-runtime -o obj/adserver \
                ./obj/adserver.obj/adserver.m.o \
                     -L/home/philou/GNUstep/Library/Libraries 
-L/opt/GNUstep-trunk/Local/Library/Libraries 
-L/opt/GNUstep-trunk/System/Library/Libraries   -lAddresses   -lgnustep-base   
-lpthread -lobjc   -lm

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

Philippe



reply via email to

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