It’s possible to build GEOtop with static and shared linking method. However, it’s not possible to build the source code through Microsoft Visual Studio at the moment. So that, it’s necessary to install Cygwin as following described.
1. Cygwin installation
Download the executable from the Official Web Site on the basis of your machine (32-64bit)
Run the executable and click
Next until arriving at Choose Download Site.
Now, choose a repository from which download the packages to install. Then click
Next and you should see a window like the following
Expand the Archive
Libs section and select the following packages
Expand the Devel section and select the following packages
proj in the Search area
Expand the section Libs
Click on Skip on each on of the three
Then click on Next
Then click on Next again, in order to install all the required dependencies. At the end of the installation, you should find an icon on the Desktop and one on the Start Menu.
2. Bulding GEOtop: static linking
First of all, open the Cygwin terminal (a link should be available on the Desktop). Enter inside your user home typing:
user is your username. Now create a folder where put the source codes, e.g.
src, and enter into it.
Now you need the MeteoIO source code and then you have to build it. Unfortunately, in order to make it works with Cygwin you should apply a patch to the official version. I created the patched version od the MeteoIO 2.4.2 source code and then I uploaded it on GitHub, so you can easily clone and build it.
set the following flags
and the other one
Now you have to build the Boost library. First of all, you can get tar.gz package from http://sourceforge.net/projects/boost/files/boost/1.58/, then move the package inside the
src folder. Extract the source code and then enter into the folder
Now, to configure and then build and install the Boost library, type
Now, the last step is building GEOtop. You can clone it from the GitHub repository, inside the
You might get the following Warning message:
CMake Warning at /usr/share/cmake-3.3.2/Modules/Platform/CYGWIN.cmake:15 (message): CMake no longer defines WIN32 on Cygwin! (1) If you are just trying to build this project, ignore this warning or quiet it by setting CMAKE_LEGACY_CYGWIN_WIN32=0 in your environment or in the CMake cache. If later configuration or build errors occur then this project may have been written under the assumption that Cygwin is WIN32. In that case, set CMAKE_LEGACY_CYGWIN_WIN32=1 instead. (2) If you are developing this project, add the line set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required at the top of your top-level CMakeLists.txt file or set the minimum required version of CMake to 2.8.4 or higher. Then teach your project to build on Cygwin without WIN32. Call Stack (most recent call first): /usr/share/cmake-3.3.2/Modules/CMakeSystemSpecificInformation.cmake:36 (include) CMakeLists.txt:15 (project) Linking mode: SHARED
Just ignore it and press
e to exit. Then switch the flag
BUILD_STATIC to ON, then
at the end start building the source code
To have the
geotop.exe working from within each and every folder of your pc, you have to Add
C:cygwinbin for 32bit pc or
C:cygwin64bin for 64bit pc to the environmental variables.
Start-> Computer-> System properties-> Advanced system settings-> Environment Variables, scroll down the System variables section looking for Path variable
double click on it and add the first item if your operating system is 32bit, the second one if it is 64bit. Pay attention that the initial semicolon is not a mistake, it’s the separator with the previous value.
Then you can call the
geotop.exe executable from within each folder in your system.