使用arm交叉编译器编译Atmel示例时得到:
../at91lib/utility/stdio.c:64:8:错误:变量“r”具有初始值设定项,但类型不完整
代码是:
struct _reent r = {0, (FILE *) 0, (FILE *) 1, (FILE *) 0};
我不知道我在这里能做什么,因为我首先需要理解这段代码的含义?
然后我可以为我的编译器重新编码吗?或者我必须将编译器降级到其他版本吗?
我的版本: arm-unknown-linux-uclibcgnueabi-gcc(Buildroot 2012.05-git-00423-g4205dbd)4.5.3
最佳答案
It looks like you have to use exactly the right version of compiler: To get sam-ba applets to compile under linux you have to use Sourcery G++ Lite 2008q3-39 for ARM EABI from http://www.codesourcery.com/sgpp/lite/arm/portal/release567 Anything newer or older gives (different) errors.
关于c - 如何修复: struct _reent r = {0,(FILE *)0}? struct _reent 是任何工具链的一部分吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10528536/