next up previous contents index
Next: Known Problems Up: GMT on non-UNIX platforms Previous: Introduction

Cygwin and GMT

   

Because GMT works best in conjugation with UNIX tools we suggest you install GMT using the Cygwin product from Cygnus (www.cygnus.com/cygwin). In short, Cygwin provides the bash  shell (Bourne Again shell); in this shell you have access to most standard GNU development tools such as compilers and text processing tools (awk , grep , sed , etc.). If you don’t mind learning bash  scripting19.3 you can write any type of GMT scripts (The GMT examples also come in bash  form).

Follow the instructions on the Cygwin home page on how to install the executables; they are in ZIP format and the whole package comes with an installer. It is difficult not to do this correctly. Follow their advice on setting a larger environmental space, and copying sh.exe to /bin.

You need as always to install netCDF. Look at the netCDF home page19.4 and locate the discussion of a WIN32 port. Following the links gives you either the option to ftp a ready-made libnetcdf.a library or to learn how to make your own in Cygwin.

GMT 3.3.1 installs without a hitch provided you make a few changes to the makegmt.macros file:

1.
In Windows/DOS, set the two environmental variables HOME and GMTHOME to point to your ``home'' directory while running Cygwin and the GMT install directory. These two parameters should be defined in the autoexec.bat file and could be something like19.5

2.
In this home directory, make the file .bashrc where you place a few definitions:

3.
Then, copy makegmt.macros.orig to makegmt.macros, and edit the latter in the following way:

4.
In the GMT src directory, edit the bash  script cygwin_prep_gmt.bash and modify the two directory variables as indicated. Then, make various directories and set required links with the command ``bash cygwin_prep_gmt.bash''.

5.
You may now do ``make all'', ``make install'', and ``make clean''.

6.
If you also installed the example scripts you can test GMT by running ``make examples''.



 
next up previous contents index
Next: Known Problems Up: GMT on non-UNIX platforms Previous: Introduction
Paul Wessel
1999-07-01