#ifndef DOXYGEN_SKIP /* $Id: gdal_building.dox 10576 2007-01-07 13:00:17Z dron $ */ #endif /* DOXYGEN_SKIP */ /*! \page gdal_building Building GDAL From Source \section gdal_building_unix Building on Unix GDAL has been successfully built on Linux, IRIX, Solaris, BSD, and MacOS X. On Unix platforms you might be able to build it as follows (assuming it is unpacked or checked out of CVS as gdal):
% cd gdal
% ./configure
% make
% su
Password: ********
# make install
# exit
In order to run GDAL after installing it is necessary for the shared library to be findable. This can often be accomplished by setting LD_LIBRARY_PATH to include /usr/local/lib.

Some caveats are:

\section gdal_building_win Building on Windows GDAL can be built on Win32 platforms using MS VC++ 6.x and MS Visual Studio .NET (C++). The source distribution includes NMAKE compatible makefiles for use from the command shell. For those wanting Visual Studio 7.1 Solution files (instead of the command line nmake files), Ben Discoe normally makes them available on the VTerrain site. Only the nmake file approach is directly supported by the GDAL maintainer.

Windows CE is also supported by an alternate set of build files. See GDAL for Windows CE for details. For command line builds you will normally have to have run the VCVAR32.BAT script that comes with the compiler. For VC 6.x this might be found at:

C:\\Program Files\\Microsoft Visual Studio\\VC98\\bin\\VCVARS32.BAT
Once the environment is setup, you can cd to the GDAL root directory and do the following:

C:\\GDAL> nmake /f makefile.vc
Once the build has completed successfully, you can also install the required GDAL files for using GDAL utilities using the install makefile target. Ensure that BINDIR, and DATADIR are set appropriately in the nmake.opt file before doing this.
C:\\GDAL> nmake /f makefile.vc install
If you wish to build your own applications using GDAL you can use the following command to install all the required libraries, and include files as well. Ensure that LIBDIR and INCDIR are properly set in the nmake.opt file.
C:\\GDAL> nmake /f makefile.vc devinstall
Projects linking against GDAL should include the directory specified in INCDIR in the include path, and the directory specified in LIBDIR in their /LIBPATH. To use gdal link against the gdal_i.lib stub library. \subsection gdal_building_win_basic Basic Options There are lots of options that can be tweaked by hand in the nmake.opt file in the GDAL root directory. \subsection gdal_building_win_advanced Advanced Options I frequently forget to update the Windows makefiles when I add new files, so if something comes up missing consider comparing the file lists in the appropriate makefile.vc against the GNUmakefile or just contact me.

\section gdal_building_libraries External Libraries Several drivers require additional libraries to be installed in your system. These are:

\section gdal_building_lfs Large File Support GDAL supports reading and writing large files (> 2GiB) if it is possible in your operating system. Notes about large file support on Linux available here: http://www.suse.de/~aj/linux_lfs.html. In short: if you have kernel 2.4.x and glibc 2.2.x you are in luck. Maximum file size depends on cluster size. For ext2 filesystem with 1 KiB clusters it is 16448 MiB, for ext2 with 4 KiB clusters it is 2048 GiB. Other filesystems can handle even larger files.

Information about large file support in Windows could be obtained at MSDN. In short, maximum file size at NTFS is limited by (2^64 - 1) bytes, at FAT32 and FAT16 it is (2^32 - 1) bytes. So don't try create files larger than 4 GiB on FAT32. In some cases you will not get an error message during jumping over 4GiB barrier, but all your data will be lost. This is not a GDAL bug, this is Windows problem.

\htmlonly

$Id: gdal_building.dox 10576 2007-01-07 13:00:17Z dron $

\endhtmlonly */