Eclipse CDT with Cygwin GCC: Automatically Detect Characters and Paths

I am using Eclipse CDT with Cygwin GCC 3 as a compiler. My project uses a custom makefile.

The problem is that when debugging the code, it could not find the source files, although I added a custom path mapping for: /cygdrive/c <-> c:\

This is in addition to the fact that I get "unauthorized inclusion" for all standard header files, even if the program compiles and works fine.

I traced the problem to the "auto detect" option, which shows the following error:

screenshot1

Please note that I made sure that the workspace directory is in the path without spaces. The strange thing is that when I run this problem command in the shell, it works fine with the following output:

$ gcc -E -P -v -dD C:/Users/Amro/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c
Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
Configured with: /managed/gcc-build/final-v3-bootstrap/gcc-3.4.4-999/configure --verbose --program-suffix=-3 --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,pascal,java,objc --enable-nls --without-included-gettext --enable-version-specific-runtime-libs --without-x --enable-libgcj --disable-java-awt --with-system-zlib --enable-interpreter --disable-libgcj-debug --enable-threads=posix --enable-java-gc=boehm --disable-win32-registry --enable-sjlj-exceptions --enable-hash-synchronization --enable-libstdcxx-debug
Thread model: posix
gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
 /usr/lib/gcc/i686-pc-cygwin/3.4.4/cc1.exe -E -quiet -v -P -D__CYGWIN32__ -D__CYGWIN__ -Dunix -D__unix__ -D__unix -idirafter /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api -idirafter /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/lib/../../include/w32api C:/Users/Amro/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c -mtune=pentiumpro -dD
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/include"
ignoring duplicate directory "/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/lib/../../include/w32api"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/i686-pc-cygwin/3.4.4/include
 /usr/include
 /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api
End of search list.
#define __STDC_HOSTED__ 1
#define __GNUC__ 3
       [.... truncated ....]
#define __unix__ 1
#define __unix 1

include :

screenshot2

, , ? .cproject? ( , MinGW Cygwin!)

+5
1

- cygwin. , eclipse Windows cygwin, .

windows eclipse. is/usr C:\cygwin, . eclipse c:\usr .

, Windows? , , , .

- .cproject

+6

All Articles