CDT does not detect valid Cygwin gcc files, even after they contain paths

I have a rather hectic question, since this problem was not a problem on the Linux machine and on my Windows XP machine. But now, after I upgraded to the 64-bit version of Windows 7, I ran into the main problem of getting Eclipse to find my C ++ files ...

My setup:
I am running Windows 7 64bit. I installed cygwin in "C: \ Program Files \ cygwin" and Eclipse Juno 64bit on "C: \ Program Files \ eclipse".

My problem:
I created the base project "Hello World" C ++ Makefile using the Cygwin toolkit. Compilation works without problems, but Eclipse still complains that it cannot find the include for "iostream".

What I tried:
In Project Properties -> C / C ++ General -> Paths and Symbols -> Includes, I set the Include directory for GNU C and GNU C ++ to

C:\Program Files\cygwin\lib\gcc\i686-pc-cygwin\4.5.3\include 

which contains iostream is included in a subdirectory. It didn’t work

Then I tried the exact directory

 C:\Program Files\cygwin\lib\gcc\i686-pc-cygwin\4.5.3\include\C++ 

containing iostream. An inclusion was found this time, but even after restoring the index, Eclipse still does not allow std, cout, and endl. Then I tried the include directory of version 3.x gcc

 C:\Program Files\cygwin\lib\gcc\i686-pc-cygwin\3.4.4\include\C++ 

and it worked. Unfortunately, I need gcc 4.x, so for me this is not a permanent solution.

My question is:
How can I solve this problem and make Eclipse find the gcc 4.x include directories and use them correctly?

+4
source share
1 answer

Instead of changing your project-related changes, you should make Eclipse forget and re-open the directories included in the compiler. Do it through Windows | Settings | C / C ++ | Build | Settings you need to clear the opening records for gcc.

see also this question .

+2
source

All Articles