+ -
当前位置:首页 → 问答吧 → 有关arm 编译器的问题

有关arm 编译器的问题

时间:2005-10-06

来源:互联网

各位大侠:
本人在编译一文件时出现如下错误:
#arm-elf-gcc -o hello hello.c

/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):collect2:1d returned exit status



附:hello.c

#include "stdio.h"

main(void)

{

printf("hello world");

}

please help!!!      

作者: zzhluckboy   发布时间: 2005-10-06

编译环境没配置好吧
你用ADS来开发吧。      

作者: lb8027   发布时间: 2005-10-10

[QUOTE=zzhluckboy]各位大侠:
本人在编译一文件时出现如下错误:
#arm-elf-gcc -o hello hello.c

/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):collect2:1d returned exit status



附:hello.c

#include "stdio.h"

main(void)

{

printf("hello world");

}

please help!!![/QUOTE]
你这种编译器是那种没有支持libc的kernel专用编译器吧 :cool:      

作者: 魔芋   发布时间: 2005-10-13

不知道是不是不支持直接生成elf格式的
arm-elf-gcc -Wl,-elf2flt -o hello hello.c就没问题      

作者: guotii   发布时间: 2005-10-13