I'm using Eclipse-CDT to develop and compile projects for Linux. As host both Linux or Windows may be used.
The project is created as Makefile project with a special build command, so I changed the build-command from make
to our special one and the "Build" and "Clean" commandline approbriately. The build command uses a gcc from a directory not in $PATH
, because the whole compiler-suite is located in the version control system. (Correct $PATH
is set by the build command.)
This works fine under Linux: Eclipse learns the Symbols and Include Files automatically. However, under Windows the Symbols are recognized, but the Include Paths aren't.
When I have a look in the generated MyProject.sc file in the workspace/.metadata/.plugins/org.eclipse.cdt.make.core
directory, I see that the Include-Files are recognized, but prepended with a C:\cygwin
.
The GCC command line uses absolute paths without the Drive letter.
(The whole source tree is located on a special Drive (e.g. W:
), CWD is on this drive ).
E.g. gcc
/g++
is invoked with -I /net_libs/lib1/inc
and Eclipse recognizes C:\cygwin\net_libs\lib1\inc
.
BTW: The standard-include paths are recognized correctly (e.g. W:/toolchain/win32/i686-pc-linux-gnu/include/c++/4.2.1
).
The Build-Directory is set to the directory of the Makefile which is on the same Drive as the Sources and Includes.
I tried various "Toolchain" settings (Cygwin, MinGw, Linux gcc), the result is same every time. (After changing the settings, I even stopped Eclipse, deleted the sc file and started Eclipse again).
I don't know why Eclipse knows about my Cygwin installation in C:\Cygwin - the installation is NOT used by the compiler or related tools.
When I change the .sc file manually and correct the paths and restart Eclipse, everything works fine.
Do you have any hints what may be the problem?