Definition of __STDC_HOSTED__ in Eclipse? [message #989936] |
Mon, 10 December 2012 07:33 |
Adam Goodwin Messages: 4 Registered: December 2012 |
Junior Member |
|
|
Hi,
I'm using Eclipse to write the code for an embedded project. The toolchain I am using is Yagarto, and therefore I am writing software for an ARM chip. (SAM7S256 to be specific.)
I have added the relevant include directory to the project, which has the header file I need to use. This is stdint.h. The problem is that I get errors like "Type 'uint8_t' could not be resolved"
In my code, Eclipse is able to find stdint.h - I can right click on the #include directive and open stdint.h from within Eclipse without any trouble. So Eclipse knows where to find the header file, that's not the problem. The problem is to do with the contents of stdint.h.
This is the contents of the stdint.h included with Yagarto:
#ifndef _GCC_WRAP_STDINT_H
#if __STDC_HOSTED__
# include_next <stdint.h>
#else
# include "stdint-gcc.h"
#endif
#define _GCC_WRAP_STDINT_H
#endif
When I hover over "__STDC_HOSTED__", Eclipse tells me that it is defined as 1. I haven't really understood what the point of __STDC_HOSTED__ is, but clearly it needs to be set to 0 as stdint-gcc.h is included with Yagarto, whereas Yagarto doesn't have another stdint.h file.
So my question is, does anybody know more about this? Where in Eclipse can I change the definition of __STDC_HOSTED__?
Obviously I could just #include stdint-gcc.h instead, which I may well have to do, but I'd prefer to be including stdint.h which I believe is the proper way of doing things.
Thanks
|
|
|
Powered by
FUDForum. Page generated in 0.02698 seconds