- Download MinGW installer from the official website http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get-inst/
- Install MinGW with the latest version
- Follow the instruction on the guide Getting Started http://mingw.org/wiki/Getting_Started so as to download and set up the gcc and g++ compiler
- Download and unzip GSL library source from the offical website ftp://ftp.gnu.org/gnu/gsl/
- Copy the GSL source folder to the MinGW installation path, for example, C:\MinGW\msys\1.0\home, which is equivalent to /home in the GNU system
- Read the INSTALL in GSL source folder. If you want to have a quick set up, read the instruction under "The simplest way to compile this package is"
- Write the code which invokes function in GSL by following the example of GSL in the offical web site
- Download Eclipse IDE for C/C++ Developers (includes Incubating components) from the offical website. http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers-includes-incubating-components/indigor
- Unzip and open the eclipse.exe inside.
- Follow the instruction to do the initial set up for the IDE.
- After that, start a new project and choose MinGW as the toolchain for the project. Then click finish.
- Right click your project in the Project Explorer then click Properties.
- We need to construct the commands as shown in the GSL example with the steps. below.
- Under C/C++ Build –> Settings –> GCC C++ Compiler –> Includes, add the following paths: (supposing your MinGW installation path is C:\MinGW)
- Repeat the previous step under C/C++ Build –> Settings –> GCC C Compiler –> Includes
- In MinGW C++ Linker –> Libraries –> Libraries (-l), add the followings:
- In MinGW C++ Linker –> Libraries –> Library search path (-L), add the foolowing paths:
- Create a new C++ file and copy the example of GSL to the editor.
- Click Run Configuration, add a new configuration under C/C++ Application and press OK
- Rebuild the whole project to see the results