[Gc] Problem when linking..

Renaud Dubois renaud.dubois at gmail.com
Fri Mar 17 13:27:24 PST 2006


Hi,

I have some problems to link my program with gc.$ make

$ make
gcc -DDEBUG -DGARBAGE_COLLECTOR  -lgc   -c -o module1.o module1.c
gcc: -lgc: linker input file unused because linking not done
gcc -DDEBUG -DGARBAGE_COLLECTOR  -lgc -o module1 module1.o


The program is well linked..
 $ ldd module1
        linux-gate.so.1 =>  (0xffffe000)
        libgc.so.1 => /usr/lib/libgc.so.1 (0xb7f28000)
        libc.so.6 => /lib/tls/libc.so.6 (0xb7e0d000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7e09000)
        /lib/ld-linux.so.2 (0xb7f70000)



The make file:

# FUNCTION:
# Makefile for module 1

CC=gcc

NAME=module1

OBJS=module1.o

OPTIMIZE= -O2 -march=i486 -mtune=i686 -Wall
LIBRARY= -lgc
FLAGS= -DDEBUG -DGARBAGE_COLLECTOR

CFLAGS=  $(FLAGS)  $(LIBRARY)

all: $(NAME)

$(NAME): $(OBJS)
        $(CC) $(CFLAGS) -o $(NAME) $(OBJS)

$(NAME).o: $(NAME).c

clean:
        rm -f *.o $(NAME) core *~

I'm using the gc version 6.5 on linux Gentoo 2.6.12-gentoo-r9 and gcc
version 3.4.5

Renaud Dubois
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://napali.hpl.hp.com/pipermail/gc/attachments/20060317/2bfc7042/attachment.htm


More information about the Gc mailing list