MTL 4: WinXP / Eclipse-3.2 CDT-3.1 / gcc-3
Some informations about the used systems:
Some informations about the installation path:
Now let's starting Eclipse. If Eclipse is started, change to the c++ perspective. If this is the first time you can do it under:
Window/Open Persepctive/Other
Now chose c++
and the view will get a new look!
To show the configuration we will create a new project. Chose
File/New/Project.../Managed Make C++ Project
This will open a new dialog. Enter vector1
as project name. I will change the Location
to u:/programming/vector1
. To do this, click on the check box, now you can push the Browse
button. The next dialog will open. Chose a path and in my case, the directory vector1
doesn't exist. So I have to push the button new directory
and enter the directory name vector1
. Now click Next
.
Click Finish
on the new dialog. The new project will be created and you can see it on the left side in the Navigator
or in the C/C++ Projects
view.
Now let's copy the vector1.cpp
of the mtl4 example in the new project directory. Press F5
to update the C++ perspective. Maybe you have to push more than only once. Java isn't so fast :-)
Now you can see the file vector1.cpp
in the C/C++ Projects
view.
Before we start with configuring this project, let's check your installation of MinGW. Enter at the command prompt gcc --version
. Now something similar like gcc (GCC) 3.2.3 (mingw special....)
should appear. Be sure that you don't have a second compiler in your path. Please don't install the MSYS package. This will cause some problems during the linking process. If you get here an error, please first fix this! Check your path variable and so on. Like the MSYS CYGWIN will also cause some problems. Remove the path entry, if you have installed CYGWIN!
Now mark with one left click your project in Eclipse. Than one right click to open a context menu. Go down to Properties
and click again. Properties for vector1
dialog appears. Click on C/C++ Build
. In this section, we will find all the necessaries properties we have to configure.
In Active configuration
you can read Debug
. For this simple example, change it to Release
.
Now in Configuration Settings / Tool Settings
click on GCC C++ Compiler / Directories
. Here we have to include the directories of mtl4 and the boost library. We can do it with a click on the icon with the green cross. In the new dialog, click on File system...
and chose the mtl4 main directory and do the same for the boost library. So this property will contain two entries.
Now change to the tab Build Settings
. Enter an artifact name and an extension. For windows systems this should be exe
. For artifact name you can take vector1
.
Under Build command
you have to enter mingw32-make -k
.
So we can go to the next tab Environment
. I have installed several compiler vor AVM microcontrollers, CYGWIN and the MinGW. This step is necessary to compile the example successfull, even though I removed all the compiler entries in the path variable. Don't ask me why!
Click on the button New
in the configuration section. A next dialog appears. In the field Name
enter path
. In Value
appears your path and in my case in the front of all the cygwin installation. Now remove this and all other compilers in this path (inside the value field). The field Delimiter
contains the correct sign. Let's change the Operation
to Replace
and click on OK. So a new user variables appears. Click on apply and than on OK.
Now you can test it if you can compile this simple example. Otherwise, please restart Eclipse.
P.S.: The description how to use Eclipse is contributed by Michael Schmid and we are very grateful for his efforts.
WinXP / Eclipse-3.2 CDT-3.1 / gcc-3 -- MTL 4 -- Peter Gottschling and Andrew Lumsdaine
-- Generated on 24 Aug 2009 by Doxygen 1.5.9 -- Copyright 2008-09 by TU Dresden and the Trustees of Indiana University.