clean:
-rm -f $(EXEC) *.elf *.gdb *.o
然后make:
[root@localhost vme]# make
arm-elf-gcc -o server server.o
/usr/local/lib/gcc-lib/arm-elf/2.95.3/libgcc.a(__main.o): In function `__do_global_ctors':
__main.o(.text+0xc4): undefined reference to `__CTOR_LIST__'
/usr/local/lib/gcc-lib/arm-elf/2.95.3/libgcc.a(__main.o)(.data+0x0): undefined reference to `__DTOR_LIST__'
collect2: ld returned 1 exit status
make: *** [server] Error 1
或者:
[root@localhost vme]# arm-elf-gcc -I /usr/include/ server.c
/tmp/ccQjsEGJ.o: In function `main':
/tmp/ccQjsEGJ.o(.text+0x12c): undefined reference to `htonl'
/tmp/ccQjsEGJ.o(.text+0x144): undefined reference to `htons'
/usr/local/lib/gcc-lib/arm-elf/2.95.3/libgcc.a(__main.o): In function `__do_global_ctors':
__main.o(.text+0xc4): undefined reference to `__CTOR_LIST__'
/usr/local/lib/gcc-lib/arm-elf/2.95.3/libgcc.a(__main.o)(.data+0x0): undefined reference to `__DTOR_LIST__'
collect2: ld returned 1 exit status
哪位大牛知道是什么原因吗?先谢了.