主题 : U-boot网卡移植出现undefined reference to `eth_init' 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 80585
精华: 0
发帖: 2
金钱: 10 两
威望: 2 点
贡献值: 0 点
综合积分: 4 分
注册时间: 2012-10-27
最后登录: 2013-07-01
楼主  发表于: 2012-10-27 13:32

 U-boot网卡移植出现undefined reference to `eth_init'

net/net.c:308: undefined reference to `eth_init'
undefined reference to `eth_halt'
net/libnet.a(net.o)(.text+0x43c):/home/ljy/u-boot-1.1.6/net/net.c:496: undefined reference to `eth_halt'
net/libnet.a(net.o)(.text+0x45c):/home/ljy/u-boot-1.1.6/net/net.c:490: undefined reference to `eth_rx'
net/libnet.a(net.o)(.text+0x538):/home/ljy/u-boot-1.1.6/net/net.c:550: undefined reference to `eth_halt'
net.c中调用了net.h文件,而ner.h文件中有关于这些函数的外部定义,为什么还有这些提示呢?原因是你的U-boot顶层Makefile文件中的LIBS += dtt/libdtt.a
#LIBS += drivers/libdrivers.a这行的库连接被注释掉了,DM9000不能连接这个库生成.o文件,除掉前面这个#就可以。