(return to the main page), (IDL and GDL), (GDL Tutorial).

Other documents to compile GDL: in OSX (OSX 10.5.6 and OSX 10.6.3), on CentOS 5.4/5.5, on Ubuntu 12.04.

Levan LORIA (With help from Jeongbin Park)
June 25, 2014
Don't hesitate to contact me for any types of errors and improving this document
Levan.Loria_at_obspm.fr

HowTo compile GDL (0.9.4 CVS)
in Windows 32 Bits within MinGW

The goal of this document is to show how to compile and run GDL in windows 32 bits with MinGW. Another document will adress soon the compilation with MS Visual C++.

To compile GDL on MSwin we will need four mandatory parts:
  1. Minimalist GNU for Windows which provides GCC 4.8.1 compiler
  2. CMake, used by PLplot and GDL
  3. to prepare Make files.
  4. Plplot source code
  5. GDL source code (current CVS version (after June 10) which include several patches to simplify MSwin support)

I will show you how to install MinGW, CMake, how to use a "Windows Command Line Prompt", how to add the directory to "PATH Enviroment Variable" in Windows and finally how to compile GDL with "GCC" and "CMake"

Step 1: How to open the Windows Command Line Prompt

Click to the "Start Menu Button" and type "cmd" in the textfield. (push [Windows Key] + [R] and type "cmd").

Step 2: Installing MinGW

  1. Download a MinGW installer from MinGW.org (mingw-get-setup.exe from MinGW Installer).
  2. Run mingw-get-setup.exe file and click to "Install".
  3. Now you must choose a C:\MinGW directory and click to "Continue".
  4. When downloading click to "Continue".
  5. Now we must choose the packages we want to be installed. Mark all the packages from the "Basic Setup", click to "Installation" from the menu,click to "Apply Changes" and "Apply".
  6. After all changes were applied successfully,you can close a dialogue windows and quit a "MinGW Installation Manager".
  7. We installed MinGW, but we need to add the MinGW binary directories to the "PATH Enviroment Variable". Click to the windows "Start Menu Button" and type "sysdm.cpl" in the textfield (Or push [Windows Key] + [R] and type "sysdm.cpl"). Now you see a new window "System Properties", click to the "Advanced system settings" -> "Enviroment Variables" -> Select "Path" variable in the second "System Variables" list and click to "Edit".Now you see a new window with the variable name and the value, you must add "C:\MinGW\bin" and "C:\MinGW\libexec\gcc\mingw32\4.8.1" at the end of the value,(the delimiter between the paths is ";" symbol) and save changes,click to OK for all windows.
    Note that in "C:\MinGW\libexec\gcc\mingw32\4.8.1" "4.8.1" is the gcc version number, so check it before adding to PATH environment.

Open the new Windows Command Line Prompt and type "gcc --version". I have gcc version 4.8.1.

Step 3: Installing CMake

  1. Download Windows(Win32 Installer) from CMake.org (the latest version on 25/06/2014 is 3.0).
  2. Run executable file and click to "Next",accept the terms,choose "Add CMake to the system PATH for all users" and click to "Next".
  3. Now choose the "C:\Program Files\CMake" directory and click to "Next" and then "Install".
  4. After installation click to "Close".
  5. Also for convenience, add CMake bin directory in PATH : [Windows Key] + [R] -> type "sysdm.cpl" -> "Advanced system settings" -> "Enviroment Variables" -> Select "Path variable" in the second "System Variables" list and click to "Edit" - > Add "C:\Program Files\CMake\bin" (delimiter is - ; symbol) -> Save the changes.

Open the new Windows Command Line Prompt and type "cmake --version". I have CMake version 3.0.0.

Step 4: The latest CVS release of GDL

  1. Make the folder GDL on the local disk C (C:\GDL)
  2. Download the latest CVS release of GDL from GDL CVS root (we do not provide a md5sum key since the TarBall will change each time the CVS is updated, which occurs daily !)
  3. Unzip downloaded tar file and copy "gnudatalanguage" folder to C:\GDL folder (like this -> C:\GDL\gnudatalanguage\gdl\...)
  4. Now download required libraries and headers for windows 32 bits, from win32libs for GDL (today version of win32libs.zip has md5 key = 2baa9026b70c298210e1fb429e83ead4). win32libs.zip contains all necessary files for : gsl, plplot, readline, rpc, ncurses, fftw3, zlib, regex,...
  5. Unzip downloaded file and copy "win32libs" folder to "C:\GDL\gnudatalanguage\gdl\" folder. (C:\GDL\gnudatalanguage\gdl\win32libs\bin,C:\GDL\gnudatalanguage\gdl\win32libs\include,C:\GDL\gnudatalanguage\gdl\win32libs\lib)

We are ready to start installation of GDL

Step 5: Installation of GDL

1. Open the Windows Command Line Prompt and type "cd C:\GDL\gnudatalanguage\gdl\"
2. Type the command "cmake -G "MinGW Makefiles" -DCMAKE_LIBRARY_PATH=win32libs\lib -DCMAKE_INCLUDE_PATH=win32libs\include -DCURSES_LIBRARY=win32libs\lib\pdcurses.a -DCURSES_INCLUDE_PATH=win32libs\include -DWXWIDGETS=OFF -DMAGICK=OFF -DNETCDF=OFF -DHDF=OFF -DHDF5=OFF -DPYTHON=OFF -DEIGEN3=OFF -DPSLIB=OFF -DX11=OFF -DGRAPHICSMAGICK=OFF"
3. Type the command "mingw32-make -j N" (N = number of cores, e.g. "mingw32-make -j 4" , if your computer has 4 cores )
4. After installation, it will generate "gdl.exe" executable file in "C:\GDL\gnudatalanguage\gdl\src\" folder.
5. To run this file (gdl.exe), you need to copy it to "C:\GDL\gnudatalanguage\gdl\win32libs\bin" folder and run from there (you can make a shortcut ...).

Installation of GDL with Eigen

1. Download the latest version of Eigen www.eigen.tuxfamily.org (eigen-eigen-6b38706d90a9.tar.bz2 md5 key = ece1dbf64a49753218ce951624f4c487)
2. Unzip downloaded file and rename to eigen;
3. Now copy eigen folder to "C:\GDL\gnudatalanguage\gdl\" folder
4. We are ready to install!
5. In Windows Command Line Prompt type the command - "cd C:\GDL\gnudatalanguage\gdl\"
6. Type the command - "cmake -G "MinGW Makefiles" -DCMAKE_LIBRARY_PATH=win32libs\lib -DCMAKE_INCLUDE_PATH=win32libs\include -DCURSES_LIBRARY=win32libs\lib\pdcurses.a -DCURSES_INCLUDE_PATH=win32libs\include -DWXWIDGETS=OFF -DMAGICK=OFF -DNETCDF=OFF -DHDF=OFF -DHDF5=OFF -DPYTHON=OFF -DEIGEN3DIR=eigen -DPSLIB=OFF -DX11=OFF -DGRAPHICSMAGICK=OFF"
7. Type the command - "mingw32-make -j N" (N = number of cores, e.g. "mingw32-make -j 4" , if your computer has 4 cores )
8. After installation, it will generate "gdl.exe" executable file in "C:\GDL\gnudatalanguage\gdl\src\" folder.
9. To run this file (gdl.exe), you need to copy it to "C:\GDL\gnudatalanguage\gdl\win32libs\bin" folder and run from there (you can make a shortcut ...).