1

As the title says ,I get warnings with those two issues ,
The code compiles and run ,but its driving me crazy all those red and yellow lines under the code.
How can I remove them and still get the warnings and errors for "real" errors .

I'm running eclipse 4.2.2 , coding in c language .
system : Ubuntu 13.04 64 bit

3 Answers 3

1

Note this is a warning from the IDE, not a warning from the compiler or an error. The problem is the IDE (Eclipse) doesn't know where your C++ libraries live. It's fairly simple to fix, you just tell it.

  1. To set properties for your project, right-click your CDT project and select Properties. Alternatively, to set properties for a specific source file in your project, right-click a source file within your make project and select Properties.
  2. Expand C/C++ General and select Paths and Symbols.
  3. Click Add to define new element (Include Path, Symbol, Library path etc).

And unless I'm mistaken, the path you want to feed it is /usr/include/c++/4.6 (that may be slightly different, depending on your version of Ubuntu).

Also, see this:

1
  • that path is what i have included , but the one that solved the problem is : "/usr/lib/gcc/x86_64-linux-gnu/4.7/include" May 17, 2013 at 11:47
0

include "/usr/lib/gcc/x86_64-linux-gnu/4.7/include" in the
path/symbols in eclipse c/c++ general tab

0

right click the project and select "propertys" menuitem,in the popup window choose "C/C++ General" then choose "Preprocessor Include path",then in the panel select all four items in "providers" tab then apply the config ,then rebuild the project ,a new Includes will add to the project and warning message "unresovled inclusion" will disappear

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .