Repository navigation
Install and Configure MinGW for ESPr Development
MinGW is a "Minimalist GNU for Windows" used to build ESP-r in Windows and can be downloaded here. Detailed below are instructions for installing MinGW and the appropriate libraries required to install ESP-r with xml and graphic user interface. The GTK+ libraries and other libraries are needed for the Windows GUI, and setup instructions are provided below as well. A special thanks to Francesca for providing the bulk of the material here. Note: What is detailed below was for Windows XP 32-bit, results are not guaranteed for other versions of the Windows OS.
Also, if your Windows user account contains spaces (ex. User: John Smith), MinGW will be confused when setting paths to your home folder. The workaround is to create a new folder with no spaces at C:/MinGW/msys/1.0/home (ex. C:/MinGW/msys/1.0/home/John). Then, whenever you launch the MinGW Shell your first command will be to change your working directory using cd ../John. Every reference in this document to <USER_NAME> will be this new folder.
- The most stable version for ESP-r and Harmonizer applications is mingw-get-inst-20111118
- Run the installation executable. When you get to the Repository Catalogues window, select Use pre-packaged repository catalogues
Figure 1: Repository Catalogues
- Accept the default install location of C:\MinGW
- Under Select Components, install the entire "MinGW Compiler suite" and "MinGW Developer Toolkit"
Figure 2: Repository Catalogues
- Then proceed with the install. A Windows command prompt should open to detail the installation progress
The GTK+ toolkit is required to created the graphical user interface in ESP-r. The project site is located at http://www.gtk.org/, however a legacy version is required. The following documents how to obtain and install the legacy GTK:
- Download from one of the mirrors and extract to C:\ (i.e. you should now have a C:\GTK folder)
- You will then need to update the PATH environment variable in Windows. To do this, navigate to Start->Control Panel->System->Advanced System->Environment Variables
Figure 3: Environment Variables
- Select the PATH variable and click "Edit"
- Append the "Variable value" with the following paths, separating each with a semi-colon
- C:\GTK\bin;
- C:\MinGW\msys\1.0\lib;
- C:\MinGW\bin;
- C:\ESRU\esp-r\bin;
Figure 4: Variable Value
-
Under "System Variables" click "New"
-
The new variable name is PKG_CONFIG_PATH
-
The variable value is C:\GTK\lib\pkgconfig;C:\Esru\esp-r\bin;C:\GTK\bin;C\MinGW\bin;
-
Now it's time to test MinGW and GTK+
-
Launch the MinGW shell. This should be at Start->Programs->MinGW->MinGW Shell (It would be useful to create a desktop shortcut. Do this by right-clicking on "MinGW Shell" and click on "create shortcut" Then click and drag the new shortcut from the menu to the desktop and rename it accordingly)
-
In the shell type "gtk-demo"
-
If everything is installed correctly you should get something like Figure 5.
Figure 5: GTK+ Demo
- If nothing shows up, double check your PATH variable
- You can check if your compiler installed with the "which gfortran" command
Figure 6: Installed Compiler
- Once all the tests check out, close the shell
Download the following pre-compiled libraries from here.
- iconv-1.9.2.win32.zip
- libxml2-2.7.8.win32.zip
- libxslt-1.1.26.win32.zip
- zlib-1.2.5.win32.zip
In each zip folder, copy the contents of bin, include and lib into the corresponding C:/MinGW and C:/MinGW/msys/1.0 folders. For the include files in libxml2, you need to create duplicates with file name libxml so there is two folders under C:/MinGW/include/ and C:/MinGW/msys/1.0/include/, one called libxml and one libxml2 both with identical contents.
Download the additional lib files and place those files in C:/MinGW/lib and C:/MinGW/msys/1.0/lib. If one of the files already exists, do not replace it.
The final step is to copy zlib1.dll, libxml2.dll, libxslt.dll and iconv.dll from their respective bin folders to C:\WINDOWS
TODO





