Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » HelloWorld fails to build(build problems with cygwin toolchain)
HelloWorld fails to build [message #1124827] Thu, 03 October 2013 19:43 Go to next message
mminka Mising name is currently offline mminka Mising name
Messages: 8
Registered: July 2009
Junior Member
I've used eclipse for years with java so these problems have been disconcerting. This is Eclipse Kepler Service Release 1.

I used cygwin (windows 7) because I already had it on my pc.

I updated my cygwin with the needed libraries: "gcc", "g++", "gdb", and "make".

I updated it because this:
#include <iostream>
using namespace std;
got errors (e.g. 'Symbol cout could not be resolved.')

The errors didn't go away.
Instead - even worse! - they are intermittent.
I now can run HelloWorld, then the errors reappear.

So I added a lot of specific paths to the include specification. Select "Project" menu ⇒ Properties ⇒ C/C++ General ⇒ Paths and Symbols ⇒ In "Includes" tab:

"Add" the following directories to "GNU C", where $CYGWIN_HOME is your Cygwin installed directory:
$CYGWIN_HOME\lib\gcc\i686-pc-cygwin\4.7.3\include
$CYGWIN_HOME\lib\gcc\i686-pc-cygwin\4.7.3\include-fixed
$CYGWIN_HOME\usr\include
$CYGWIN_HOME\usr\include\w32api
"Add" the following directories to "GNU C++", where $CYGWIN_HOME is your Cygwin installed directory:
$CYGWIN_HOME\lib\gcc\i686-pc-cygwin\4.7.3\include\c++
$CYGWIN_HOME\lib\gcc\i686-pc-cygwin\4.7.3\include\c++\i686-pc-cygwin
$CYGWIN_HOME\lib\gcc\i686-pc-cygwin\4.7.3\include\c++\backward
$CYGWIN_HOME\lib\gcc\i686-pc-cygwin\4.7.3\include
$CYGWIN_HOME\lib\gcc\i686-pc-cygwin\4.7.3\include-fixed
$CYGWIN_HOME\usr\include
$CYGWIN_HOME\usr\include\w32api

This did NOT fix it.
I notice from browsing around in the project properties that the old includes from my old cygwin install (before I updated it) are still in my project properties - even though these directories do not exist!

I get warnings like this during the build:
Invalid project path: Include path not found (C:\cygwin\lib\gcc\i686-pc-cygwin\4.5.3\include-fixed).

This directory was deleted and replaced by my cygwin update. It does not exist.
When I export the project settings this path is not included.

Where this path IS included under project settings:

Project Properties -> c/c++ General -> Preprocessor Include Paths -> GNU [C | C++] -> CDT GCC Build-in Compiler Settings Cygwin

Here you find lots of paths specifiying the paths under 4.5.3 which do not exist.
These can't be changed by me, it appears.

NOTHING that I do to clean, refresh, recreate indexes, close / open project or eclipse gets rid of these references to non-existent paths and these errors keep coming back.

What do I do?





Re: HelloWorld fails to build [message #1125047 is a reply to message #1124827] Fri, 04 October 2013 01:31 Go to previous message
mminka Mising name is currently offline mminka Mising name
Messages: 8
Registered: July 2009
Junior Member
I was able to fix this problem by reinstalling eclipse.

Then it picked up the current paths for cygwin toolchain.

Previous Topic:Indexing Enumerations with #includes
Next Topic:Debugging the CDT build process
Goto Forum:
  


Current Time: Mon Oct 07 05:57:02 EDT 2013

Powered by FUDForum. Page generated in 0.01638 seconds