Reputation: 15052
I am trying to install Eclipse on my computer: I have a 64bit Windows 7.
I have installed a 64bit Java, and a 64bit version of Eclipse helios (C/C++).
When I tried to compile a hello world project I got an error
Unresolved inclusion: < stdio.h>
I have inserted another space since the text didn't render.
I have tried looking for solutions on this site and on Google, but the best thing I found was this post.
But I don't know where to locate stdio.h myself.. I have used the search on my computer and didn't find such a file. maybe I don't have one, what should I do ?
Upvotes: 3
Views: 23110
Reputation: 535
What is the suffix of your filename - foo.c? foo.cc?
By default, Eclipse assumes that .c files should be parsed to the C standard, while .cc files should be parsed as C++. So, if you have C++ code in a file ending with .c, it tries to parse C++ as C, and often stumbles as soon as it hits a standard library include.
The easiest solution is to rename your files to *.cc. You can see Eclipse's list of suffix associations by going to Window->Preferences->C/C++->File Types
, but unfortunately it doesn't seem to be possible to change the defaults.
Upvotes: 0
Reputation: 496
I have a similar issue. It is due to not installing cygwin/gcc and not adding cygwin_install_path/bin to Path.
Upvotes: 0
Reputation: 343
If you changed the current toolchain, please reopen(close and open) the project.
Upvotes: 1
Reputation: 656
The location of your headers depends on what tool chain you are using. You can go to Properties -> C/C++ Build -> Tool Chain Editor
to find out which it is. Once you know that, you need to locate the headers and include them (in manner your post suggests). For example here is example of someone having the same issue with MinGW tool chain. Find you about your tool chain and I will attempt to guide you if I will be able to.
Upvotes: 3