I set up CDT for eclipse and wrote a simple hello world C program:
#include
int main(void){
puts(\"Hello, world.\");
return 0;
}
An error I had configuring Paths and Symbols is that initially I configued the include paths for a different language. I'm working with CDT and Cygwin gnu C++. So you must configure symbols and paths under GNU C++ language.
just adding to the knowledge base, i just did this on win7 with cygwin.
this is what seems to work for me.
include paths for c:
D:\dev\cygwin\lib\gcc\i686-pc-cygwin\3.4.4\include
D:\dev\cygwin\usr\include
include paths for c++:
D:\dev\cygwin\lib\gcc\i686-pc-cygwin\3.4.4\include
D:\dev\cygwin\lib\gcc\i686-pc-cygwin\3.4.4\include\c++
D:\dev\cygwin\usr\include
this gets me a clean compile of hello world.
In ADT I did the following:
I m using eclipse based CodeWarrior IDE for embedded projects and i have just solved this problem by deleting and adding again the source adresses to Project Properities->C/C++ General->Path and Sybols-> Include Directories. This means that there lots of reason to take "Unresolved inclusion:" message and there r lots of solution too.
I'm working with multiple cross compiler configurations, where I need to use different locations for the STD header files (and other environment variables).
The solution was to set up the indexer so it uses the active configuration.
Unfortunately due to some bug in eclipse, the option isn't stored locally, so you have to use the workspace configuration if you want to save the configuration when you open eclipse again.
Window -> Preferences -> C/C++ -> Indexer -> Use active build configuration
This will make eclipse use the right compiler that is set with the project's active Cross GCC configuration.
I'm using Eclipse with Cygwin and this worked for me:
Go to Project > Properties > C/C++ General > Preprocessor Includes... > Providers and select "CDT GCC Built-in Compiler Settings Cygwin [Shared]".