This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error while trying to initialize printf/scanf with __FILE

Hi All,

I am using Keil uVision 5 with STM32F411RE

I have a piece of code as follows (source http://www.keil.com/support/man/docs/armlib/armlib_chr1358938931411.htm)

 

#include <stdio.h>

struct __FILE
{
    int handle;
};

However, I keep seeing the error 

error: redefinition of '__FILE' at 'struct __FILE', previous definition is inside <stdio.h>

I have been following a tutorial series for STM32F4 and the instructor demonstrated this. Don't know why it isn't working for me

Parents Reply Children
No data