Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

This page describes how to install Generic Mapping Tools (GMT) on Cygwin. 

...

Set the environmental variable HDF5_DISABLE_VERSION_CHECK=2 by adding the following line to the '.bashrc' file in the cygwin home folder (Omitting this step will cause an error):

Code Block
languagebash
export HDF5_DISABLE_VERSION_CHECK=2


Download the latest stable 'gdal' source code from 'http://download.osgeo.org/gdal', and extract it to a temporary folder (e.g. '$HOME/builds/'), and run the following commands:

Code Block
languagebash
cd $HOME/builds/gdal-x.x.x (x.x.x is the version)

...


./configure --prefix=$HOME/opt/gdal-x.x.x

...


make

...


make install


Download the latest stable GMT source code from 'http://gmt.soest.hawaii.edu/projects/gmt/wiki/Download', along with 'gshhg-gmt' and 'dcw-gmt', and extract the source codes into a temporary build folder (e.g. '$HOME/builds/').

...

In the GMT source folder, copy cmake/ConfigUserTemplate.cmake to cmake/ConfigUser.cmake and edit the file. For example:

Code Block
languagebash
set (CMAKE_INSTALL_PREFIX "/home/<username>/opt/gmt5")

...


set (GSHHG_ROOT "/home/<username>/builds/gshhg-gmt-2.3.4")

...


set (COPY_GSHHG TRUE)

...


set (DCW_ROOT "/home/<username>/builds/dcw-gmt-1.1.2")

...


set (COPY_DCW TRUE)

...


set (GDAL_ROOT "/home/<username>/opt/gdal-2.0.1")
Info
Replace <username> with your actual username.

 

 Build and install GMT:

Code Block
languagebash
cd <path to GMT source>

...


mkdir build

...


cd build

...


cmake ..

...


make

...


make install

 

Set up the PATH environmental variables for GMT and GDAL by adding the following line in '.bashrc' file in the cygwin home folder:

 

Code Block
languagebash
export PATH=$PATH:$HOME/opt/gmt5/bin:$HOME/opt/gdal-2.0.1/bin

Content by Label
showLabelsfalse
max5
spacesQuakeCore
sortmodified
showSpacefalse
reversetrue
typepage
labelsGMT Cygwin

...