当前位置: 技术问答>linux和unix
dhcp的移植
来源: 互联网 发布时间:2016-11-02
本文导语: 大家帮忙阿 我现在做的客户端的移植 用的交叉编译工具是arm-elf-gcc 就是通不过 错误如下 arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer dhcpd.c arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototy...
大家帮忙阿 我现在做的客户端的移植 用的交叉编译工具是arm-elf-gcc 就是通不过 错误如下
arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer dhcpd.c
arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer arpping.c
arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer files.c
arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer leases.c
arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer serverpacket.c
arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer static_leases.c
arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer common.c
arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer options.c
arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer packet.c
arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer pidfile.c
arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer signalpipe.c
arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer socket.c
arm-elf-gcc dhcpd.o arpping.o files.o leases.o serverpacket.o static_leases.o common.o options.o packet.o pidfile.o signalpipe.o socket.o -o udhcpd
common.o(.text+0x30): In function `background':
: undefined reference to `daemon'
/usr/local/lib/gcc-lib/arm-elf/2.95.3/libgcc.a(__main.o)(.text+0xc4): In function `__do_global_ctors':
: 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: *** [udhcpd] 错误 1
我用的是udhcp-0.9.9源包
用arm-gcc-linux就没错 大家对移植dhcp客户端有什么好的想法告诉我阿 谢谢拉
arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer dhcpd.c
arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer arpping.c
arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer files.c
arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer leases.c
arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer serverpacket.c
arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer static_leases.c
arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer common.c
arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer options.c
arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer packet.c
arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer pidfile.c
arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer signalpipe.c
arm-elf-gcc -c -elf2flt -W -Wall -Wstrict-prototypes -D_GNU_SOURCE -Os -fomit-frame-pointer socket.c
arm-elf-gcc dhcpd.o arpping.o files.o leases.o serverpacket.o static_leases.o common.o options.o packet.o pidfile.o signalpipe.o socket.o -o udhcpd
common.o(.text+0x30): In function `background':
: undefined reference to `daemon'
/usr/local/lib/gcc-lib/arm-elf/2.95.3/libgcc.a(__main.o)(.text+0xc4): In function `__do_global_ctors':
: 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: *** [udhcpd] 错误 1
我用的是udhcp-0.9.9源包
用arm-gcc-linux就没错 大家对移植dhcp客户端有什么好的想法告诉我阿 谢谢拉
|
busybox中就有dhcp客户端,何必这么麻烦。