LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 791|回复: 1

求助!编译时出现了问题~!!

[复制链接]
发表于 2007-1-31 16:10:44 | 显示全部楼层 |阅读模式
我用交叉编译器编译HelloWorld时出现错误,如下:
/usr/local/devkitPro/devkitARM/lib/gcc/arm-eabi/4.1.1/../../../../arm-eabi/lib/libc.a(exit.o): In function `exit':
(.text+0x28): undefined reference to `_exit'
/usr/local/devkitPro/devkitARM/lib/gcc/arm-eabi/4.1.1/../../../../arm-eabi/lib/libc.a(sbrkr.o): In function `_sbrk_r':
(.text+0x1c): undefined reference to `_sbrk'
/usr/local/devkitPro/devkitARM/lib/gcc/arm-eabi/4.1.1/../../../../arm-eabi/lib/libc.a(makebuf.o): In function `__smakebuf':
(.text+0xe8): undefined reference to `isatty'
/usr/local/devkitPro/devkitARM/lib/gcc/arm-eabi/4.1.1/../../../../arm-eabi/lib/libc.a(writer.o): In function `_write_r':
(.text+0x24): undefined reference to `_write'
/usr/local/devkitPro/devkitARM/lib/gcc/arm-eabi/4.1.1/../../../../arm-eabi/lib/libc.a(closer.o): In function `_close_r':
(.text+0x1c): undefined reference to `_close'
/usr/local/devkitPro/devkitARM/lib/gcc/arm-eabi/4.1.1/../../../../arm-eabi/lib/libc.a(fstatr.o): In function `_fstat_r':
(.text+0x20): undefined reference to `_fstat'
/usr/local/devkitPro/devkitARM/lib/gcc/arm-eabi/4.1.1/../../../../arm-eabi/lib/libc.a(lseekr.o): In function `_lseek_r':
(.text+0x24): undefined reference to `_lseek'
/usr/local/devkitPro/devkitARM/lib/gcc/arm-eabi/4.1.1/../../../../arm-eabi/lib/libc.a(readr.o): In function `_read_r':
(.text+0x24): undefined reference to `_read'
collect2: ld returned 1 exit status


这可怎么解决呀!
发表于 2007-2-1 13:09:32 | 显示全部楼层
楼主最好给出编译环境与编译过程、参数。

这种错误多数是连接路径不正确导致的,但其原因多样,解决方法也不尽相同,比如我在交叉编译 minigui 的时候它在 ./configure 后默认的库搜索路径不是 arm-linux-gcc 的库路径,而是我的主系统的,这种情况下就要在 ./configure 后修改 libtool 的配置。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表