[cdt-dev] CDT build problems
I'm trying to work with a makefile project. I want eclipse to compile
and build in an identical manner to how the MinGW MSys shell. (eclipse
3.3.2, CDT4.0.3, MinGW in win2k)
This is tricky, and potentially there are bugs in the behavior. To
build the project in order to get it to work, here are the hoops that
I have to go through.
1./ File/ New C++ project / Makefile Project / MinGW. Toggle off
default location and enter directory name containing code and
Makefile. Click Finish.
2./ CDT/Eclipse kicks off a default build which fails. (make
successfully compiles and builds this code from the MinGW MSYS shell.)
Eclipse is definitely calling my makefile for the compile command -
however the builder is failing to find certain critical includes.
3./ RMB on new project in explorer and select "Properties"
4./ Toggle off "Use default build command" and change"make" to
"mingw32-make". (Every CDT for MinGW tutorial tells eclipse users to
do this. Could it be a default?)
5./ When first opened - In the Tool chain editor (under C/C++ Build)
the current toolchain is "MinGW GCC". There are 5 options under
current toolchain. The current builder is "Gnu make builder". There
are no other options under the current builder.
6./ If I then reselect "MinGW GCC" from the 5 options under current
toolchain, the current builder is changed to "CDT Internal Builder".
This builder option did not exist under the current builder dropdown
before. Also, my "Use default build command" has been toggled back on
and changed back to "make" from "mingw32-make". "Generate Makefiles
Automatically" has also been toggled on. The "Display compatible
toolchains only" is still toggled on.
7./ I change everything back to the way it should be, but the build is
no longer using my Makefile. There is now a MinGW GCC folder in my
file system with it's own unique (and incorrect) makefile. The g++
command is very different. I cannot restore eclipse to use my
8./ So defeated for now, I set "Generate Makefiles Automatically"
back to on, and manually enter include paths and lib objects under the
CDT build Tool settings. The external libs and includes get found now,
and the individual objects get built. Oh - except I'm building a
static library of objects, and not an executable.
I could go and try and select the "Build static library" option from
the new C++ menu option, but I'm straying from my original goal of
having an eclipse project compile and build from a Makefile the same
as the shell would.
If someone could please advise me what I'm doing wrong for eclipse to
not find includes and external libs defined in the Makefile, and
advise me how to use eclipse to edit and build a Makefile project from
disk that would be awesome!