glibc java_gcc使用newlib而不是glibc?

我想使用newlib而不是glibc来编译小的静态二进制文件 . (我不打算交叉编译,因为二进制文件将由同一台计算机使用 . )我相信我需要为此编译一个单独的gcc?

我编译了gcc:

./configure --prefix=/home/myuser/Desktop/gcc-4.4.5 --libexecdir=/home/myuser/Desktop/gcc-4.4.5 --libdir=/home/myuser/Desktop/gcc-4.4.5 --with-gxx-include-dir=/home/myuser/Desktop/gcc-4.4.5 --enable-languages=c --enable-libmudflap --disable-multilib --disable-libssp --disable-nls --with-newlib --with-gnu-as --with-gnu-ld --with-system-zlib

make

它编译没有错误,但现在我尝试编译一个简单的Hello World!程序它想要使用来自/ usr的头文件而不是我上面指定的路径 . 这些是一些错误:

In file included from /home/myprogram/Desktop/myprogram.c:1:

/usr/include/stdio.h:34:21: error: stddef.h: No such file or directory

In file included from /usr/include/stdio.h:75,

from /home/myprogram/Desktop/myprogram.c:1:

/usr/include/libio.h:53:21: error: stdarg.h: No such file or directory

In file included from /usr/include/stdio.h:75,

from /home/myprogram/Desktop/myprogram.c:1:

/usr/include/libio.h:332: error: expected specifier-qualifier-list before 'size_t'

/usr/include/libio.h:364: error: expected declaration specifiers or '...' before 'size_t'

/usr/include/libio.h:373: error: expected declaration specifiers or '...' before 'size_t'

我究竟做错了什么 ?编译一个新的gcc是必要的还是我可以使用我现有的gcc并使用newlib而不是glibc ???

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值