/*! \page gdal_building
Building GDAL From Source

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:

Building on Windows

GDAL can be built on Windows using MS VC++ 6.x and MS Visual Studio .NET (C++) at the DOS command line. For this to work 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.

Basic Options

There are lots of options that can be tweaked by hand in the nmake.opt file in the GDAL root directory.

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.

External Libraries

Several drivers require additional libraries to be installed in your system. These are:

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.

*/