Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Definition of __STDC_HOSTED__ in Eclipse?(Highlighting in my code shows __STDC_HOSTED__ equal to 1, but I need it to be 0.)
Definition of __STDC_HOSTED__ in Eclipse? [message #989936] Mon, 10 December 2012 07:33
Adam Goodwin is currently offline Adam GoodwinFriend
Messages: 4
Registered: December 2012
Junior Member

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:

# include_next <stdint.h>
# include "stdint-gcc.h"

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.

Previous Topic:Indexer detects wrong include file of two possibilities
Next Topic:reload property pages if property changes
Goto Forum:

Current Time: Sun Apr 22 22:29:07 GMT 2018

Powered by FUDForum. Page generated in 0.01761 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software