0

I'm a new C++ programmer using Eclipse. Eclipse seems to recognize C++: It let me create a new C++ project and understands the syntax. However, whenever I try to #include anything, I get an "Unresolved include" error.

I have CDT installed. I also just installed MinGW and MySys and set the path variables correctly.

It looks like something's still missing from Eclipse though -- when I right click on my project and go to "properties -> C/C++ build -> Settings" all I can access are the "binary parsers" and "error parsers" tabs. The window should look like this...

the settings window

...but I can't see the tool settings, build steps or build artifact tabs.

That's all my research has turned up so far. What should I do next?

NcAdams
  • 2,521
  • 4
  • 21
  • 32
  • 1
    In project->properties->c/c++ Build options, do you see a default make and also under tool chain editor do you see Linux gcc or g++? – fkl Sep 29 '12 at 18:08
  • 1
    IMHO, using a combination of simple command tools (an editor like `emacs`, a builder like `make`, a compiler like `gcc` ...) is simpler, and you can explain any issues with text (without needing to paste and annotate an image).... – Basile Starynkevitch Sep 29 '12 at 18:11
  • Thanks for your responses! @fayyazkl The "default build" value is just "make". I don't see Linux gcc or g++ under tool chain editor... where should they be? How can I add them? – NcAdams Oct 03 '12 at 18:16
  • @BasileStarynkevitch I dual boot Windows 7 and Ubuntu, but I mostly use Windows 7 (shame on me but it's true). I have used emacs/terminal to write C++ code before in Ubuntu, but I'd love to get C++ to work in Windows so that I don't have to restart my computer to code in C++. – NcAdams Oct 03 '12 at 18:21

1 Answers1

0

Settings on screenshot related to build process. For correct work editor (autocomlete, includes) you need to set same dirs in the C/C++ General/Paths and symbols, includes, GNU C++. Also, if path variable containt dir with g++ ecplise should to have prepared configuration if you choose mingw toolchain while creating project.

Update for comment Eclipse C++ include settings

Torsten
  • 21,726
  • 5
  • 24
  • 31
  • I can't really understand some of what you're saying... any chance you could be more specific? Where and how do I set the path directories for the attributes you named? Thanks for your help! – NcAdams Oct 03 '12 at 18:25
  • Thanks so much! I added all the paths in the screenshot and the unresolved includes went away, but I still have a problem with unresolved symbols in the body of the code. I added the same list of paths to the "library paths" tab but this did nothing. What else should I do? – NcAdams Oct 07 '12 at 22:35
  • All paths with headers should be added into Includes tab. Libraries and library paths has no effects. – Torsten Oct 08 '12 at 10:23