Sophie

Sophie

distrib > Mandriva > 9.0 > i586 > by-pkgid > d67485fb8ce60f8952179bbde3b5d022 > files > 80

libgdal0-devel-1.1.7-2mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Building GDAL From Source</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 1.2.3-20001105 on Thu Mar 28 09:47:33 2002 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; </center>
<hr><a name="gdal_building"><h2>Building GDAL From Source</h2></a>

<p>
<center>

<p>
</center>

<p>
GDAL has been successfully built on Linux, IRIX, Solaris, and Windows NT.  On Unix platforms you might be able to build it as follows (assuming it is unpacked or checked out of CVS as <b>gdal</b>):
<p>
<pre>
% cd gdal
% ./configure
% make
</pre>
<p>
Some caveats are:
<p>
 <ul>

<p>
<li> I depend on GNUmake on Unix platforms. Just get and install it if you don't already have it.
<p>

<p>
<li> The shared library building is pretty specific to the GNU tool chain.  If you are using something different than GNU C++, then you will likely  finding that the .so files isn't built successfully. You could just link  against the static libraries (normally gdal/gdal.a gdal/ogr/ogr.a  gdal/frmts/o/ *.a gdal/gdal.a gdal/port/cpl.a) or you could hack LD_SHARED  command in gdal/GDALmake.opt to work on your platform. For the SGI a value of "c++ -shared -all" is often suitable.
<p>

<p>
<li> GDAL, and it's utilities should now build on Cygwin and other platforms where shared libraries are not supported. However, to build your own  applications against it, you will need to link against a more extensive set of libraries. The <em>gdal-config --libs</em> command can be used to  determine the library set.
<p>

<p>
<li> My "autoconf" logic that checks for libtiff, libpng and libjpeg isn't too savvy about versions. If it is using pre-installed versions of these  libraries and this support isn't working, rerun configure with  ``--with-png=internal'', ``--with-jpeg=internal'', ``--with-geotiff=internal'' or ``--with-libtiff=internal'' instead. 
<p>

<p>
<li> To build on IRIX it is generally necessary to hand modify the GDALmake.opt file resulting from configure, and change "ld -shared" to "ld -shared -all".
<p>

<p>
<li> If you find build problems with one of the format drivers that you don't care about, just remove the format from the GDAL_FORMATS line at the bottom of gdal/GDALmake.opt, do a make clean, and make. This will drop it from the build and default runtime registration. 
<p>

<p>
</ul>

<p>
GDAL can be built on Windows using MS VC++ at the commandline. For this to work you will normally have to have run the VCVAR32.BAT script that comes with the compiler, and then do the following:
<p>

<p>
<pre>
C:&gt; CD GDAL
C:\GDAL&gt; nmake /f makefile.vc
</pre>
<p>
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. 
<p>

<p>
<hr><address><small>Generated at Thu Mar 28 09:47:33 2002 for GDAL by
<a href="http://www.stack.nl/~dimitri/doxygen/index.html">
<img src="doxygen.gif" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.3-20001105 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
 &copy;&nbsp;1997-2000</small></address>
</body>
</html>