How to repair : struct _reent r = {0, (FILE *) 0 }? Is struct _reent a part of any toolchain?

StackOverflow https://stackoverflow.com/questions/10528536

  •  07-06-2021
  •  | 
  •  

Question

When compiling Atmel example with arm cross-compiler getting :

../at91lib/utility/stdio.c:64:8: error: variable 'r' has initializer but incomplete type

the code is :

struct _reent r = {0, (FILE *) 0, (FILE *) 1, (FILE *) 0};

I don't know what can I do here since first I need here is to understand what this code must mean?

And then can I re code it for my compiler? Or must I downgrade compiler to some other version?

My version : arm-unknown-linux-uclibcgnueabi-gcc (Buildroot 2012.05-git-00423-g4205dbd) 4.5.3

Was it helpful?

Solution

From the AT91SAM community:

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top