Skip to main content


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 23:43 Go to next message
mminka Mising name is currently offline mminka Mising nameFriend
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 05:31 Go to previous messageGo to next message
mminka Mising name is currently offline mminka Mising nameFriend
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.

Re: HelloWorld fails to build [message #1219642 is a reply to message #1125047] Thu, 05 December 2013 07:22 Go to previous message
ChiMing Chin is currently offline ChiMing ChinFriend
Messages: 2
Registered: February 2012
Junior Member
The cygwin configuration in CDT was located in workspace path.
So, if you switch a new workspace path , CDT will refind the gcc and g++'s includes path.

These configurations was saved in the file "your workspace path\.metadata\.plugins\org.eclipse.cdt.core\language.settings.xml".You can change the value or replace with new workspace's file.

But you'd better switch a new workspace path to avoid other problem.

[Updated on: Thu, 05 December 2013 07:33]

Report message to a moderator

Previous Topic:Setting up Eclipse to compile with NVCC
Next Topic:Deactivating Post Build processes
Goto Forum:
  


Current Time: Thu Sep 19 04:30:03 GMT 2024

Powered by FUDForum. Page generated in 0.05769 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top