Re: [libdnet-devel] [ARM] My sample link error.
Status: Abandoned
Brought to you by:
dugsong
|
From: Dug S. <du...@mo...> - 2005-04-11 16:37:43
|
On Tue, Apr 12, 2005 at 01:03:08AM +0900, jang,suk-woo wrote: > dnet_test.o: In function 'main' > dnet_test.o(.text+0x60): undefined reference to 'eth_close' > dnet_test.o(.text+0x60): relocation truncated to fit: R_ARM_PC24 eth_close > collect2: ld returned 1 exit status > make: *** [dnet_test] Error 1 > > > <<Makefile>> > KERNERDIR = /usr/src/s3c2800 > CFLAGS = -I$(KERNELDIR)/include -O > CC=arm-linux-gcc > > all: dnet_test > cp -a dnet_test /nfs > > dnet_test.o: dnet_test.c > $(CC) $(CFLAGS) -c dnet_test.c > > dnet_test: dnet_test.o /usr/arm-linux/lib/libdnet.a your Makefile is just wrong. you need to actually link the library in: > dnet_test.o: dnet_test.c > $(CC) $(CFLAGS) -c dnet_test.c -L/usr/arm-linux/lib -ldnet or > dnet_test.o: dnet_test.c > $(CC) $(CFLAGS) -c dnet_test.c /usr/arm-linux/lib/libdnet.a or > dnet_test.o: dnet_test.c > $(CC) `dnet-config --cflags` -c dnet_test.c `dnet-config --libs` if you've installed libdnet correctly. -d. --- http://monkey.org/~dugsong/ |