All platforms:
Required third part libraries:
- zlib: it is necessary previously obtain or compile the zlib compression library (www.zlib.net)
- HDF5: this library is optional www.hdfgroup.org. Required only to write postprocess files with this format (files opened with GiD_PostHDF5=3 flag)
To install the required packages in Linux just do the following as root:
Ubuntu (Debian and the like): $
Code Block |
---|
apt-get install zlib1g-dev libhdf5-serial-dev |
Scientific Linux (Redhat and the like):
Code Block |
---|
...
yum install zlib-devel.x86_64 hdf5-devel.x86_64 |
Note:
Bear in mind that there are several flavours of hdf5 development packages and that you should choose the right for you.
For instance, in Ubuntu these are the HDF5 development packages available:
Code Block |
---|
libhdf5-mpi-dev |
...
libhdf5-mpich-dev |
...
libhdf5-openmpi-dev |
...
libhdf5-serial-dev |
And in Scientific Linux the HDF5 development packages available:
Code Block |
---|
hdf5-devel.x86_64 |
...
hdf5-mpich-devel.x86_64 |
...
hdf5-openmpi.x86_64 |
--> Remeber Remember to change the suffix x86_64 to i686 for the 32bit versions in Scientific Linux.
Required third part tool:
- CMake: The CMake tool (www.cmake.org) is used to have a cross-platform build system.
Must download and install this program to compile gidpost.lib (gidpost.a on Linux).
To use the graphical interface of cmake use cmake-gui or ccmake .
Note: For MS Visual Studio a project obtained from CMake is also included in the distribution, to avoid the requirement of install CMake.
Note: Users that don't want to use CMake could also manually create off course its own makefile for Unix/Linux or its own compiler project.
All the source code to generate the library is included, it can be compiled in other platforms.
The third party code, "cfortran.h", is also provided as a link between C and FORTRAN. It has its own distribution policy. Please, read the file "cfortran.doc" about the licence terms of this code.
Precompiled version:
The 'binaries' folder store precompiled release versions of the library for Windows and Linux (x32 and x64 platforms), to avoid the requirement of compile them.
CMake use: (to compile the gidpost library)
Command line: $
Code Block |
---|
<uncompress the package> |
...
mkdir build |
...
cd build |
...
cmake -DHDF5=true -DGIDPOST_USE_SYSTEM_ZLIB=true <path-to-source-files> |
...
make |
For the graphical interface of cmake use cmake-gui or ccmake .
e.g. for Windows, to compile with MicroSoft Visual Studio 2005, fill in
Where is the source code: C:/gid project/gidpost
Where to build the binaries: C:/gid project/gidpost/win/vs2005
and press "Configure"
select generate a project of "Visual Studio 8 2005", "use default native compilers"
then some errors appear (lines in red)
select GIDPOST_USE_SYSTEM_ZLIB and press "Configure"
then must specify the path to the zlib include and the zlib library
(zlib must be compiled previously using its own mechanism, or get it precompiled)
To add HDF5 extra features the HDF5 library must be compiled using its own mechanism, or get it precompiled
and then set in Cmake the values pointing to its include directory and library
press Configure, and then in 'Ungrouped Entries' appear HDF5, select it to be used.
and press Configure once more
Finally in the CMake tree, for Visual Studio is preferred instead /MD the flag /MT (to avoid dependencies of MSCVRTxxx.dll)
and instead /MDd /MTd for the debug version
Press Configure, and then "Generate", to create the VS project, then the project is created
C:\gid project\gidpost\win\vs2005\gidpost.snl and can be opened with Visual Studio