General Unix Build Instructions for the VTP Software

  1. Dependencies.  There are a lot of libraries that the VTP uses, but fortunately many of them are already included in most flavors of Unix/Linux, and several of them are optional.  Here is a dependency tree, with typical version numbers.  Generally, specific versions are not necessary for compatibility, except where noted.

    - TerrainApps (Applications VTBuilder, Enviro, etc.)
       - wxWidgets (wxGTK)              ver. 2.8.x
         - tiff                         ver. 3.5.5
         - jpeg                         ver. 6b
         - zlib                         ver. 1.2.3
       - TerrainSDK (Libraries vtdata, vtosg, vtui)
         - libpng                       ver. 1.2.12
         - OSG                          ver. 2.6 (should be at least 2.0)
           - OpenGL (glut,GLU,etc.)     ver. 1.2
         - libMini                      ver. 8.9.2 (newer versions should work)
         - GDAL                         ver. 1.5.x (must be at least 1.3.2)
           - PROJ.4                     ver. 4.4.9
         - netcdf                       ver. 3.5.0 (optional)
         - libcurl                      ver. 7.15.0 (optional)
     
  2. If you received the VTP on CDROM, then all the libraries are already present.
    Otherwise, you can download them.

    Library Download Library Website
    GDAL gdal-xxx.tar.gz http://www.gdal.org/
    PROJ.4 proj-xxx.tar.gz http://trac.osgeo.org/proj/
    OSG OSG downloads http://www.openscenegraph.org/
    wxWidgets wxGTK-xxx.tar.gz http://www.wxwidgets.org/
    libMini download page http://stereofx.org/terrain.html
    optional libraries:
    netCDF netcdf-xxx.ZIP http://www.unidata.ucar.edu/packages/netcdf/
      netCDF binaries are also available for download for just about every platform
    Libcurl download page http://curl.haxx.se/

  3. Build each dependent library.  See in the build instructions included with each, but first read this advice:
  4. Confirm that you have the data files installed for  GDAL and PROJ.4.
  5. Look at the file Make.defs.  It provide definitions for the Makefiles.  Most platform-specific build changes (compiler, flags, library locations, etc.) can be made here.
    Optionally, you set any of these flags to 1 to use an optional library:
    SUPPORT_QUIKGRID
    SUPPORT_NETCDF
    SUPPORT_HTTP   
    (for libcurl)
    SUPPORT_UNZIP
    SUPPORT_SQUISH
     
  6. Do a make in the TerrainSDK directory to build the VTP libraries.  Each library is created as a .so file (or .dylib on OS X)
     
  7. In order for the shared libraries (.so) to be found, you need to either to do one of the following:
    1. copy each .so to a place on your library path, or
    2. use make install in your TerrainSDK folder, which will copy your .so to the install folder, which on Linux defaults to /usr/local/lib (unless you have changed it in Make.defs), which is generally already on the library path, or
    3. add each directory that contains a .so to your library path.  On most Linux flavors, this can be done by setting the LD_LIBRARY_PATH environment variable, like this:

      export LD_LIBRARY_PATH=/usr/local/lib:~/vtp/TerrainSDK/vtdata:~/vtp/TerrainSDK/vtlib/vtosg:~/vtp/TerrainSDK/xmlhelper:~/vtp/TerrainSDK/vtui:~/vtp/TerrainSDK/unzip:~/vtp/TerrainSDK/minidata

      The paths depend, naturally, on where you installed and built your libraries.
       
  8. Do a make in the TerrainApps directory to build the VTP applications.

If you encounter build problems, the vtp-unix mailing list exists to answer any questions.