io::Writer: take and give strings by const ref, use .append, testcase
[geos.git] / README
blobfd51430fb576280bbbf8425e1719aeb05d488d69
1 BUILDING, TESTING, INSTALLING
2 =============================
4 Unix
5 ----
7 Using Autotools:
8   ./autogen.sh  # in ${srcdir}, if obtained from SVN
9   ${srcdir}/configure # in build dir
11 Using CMake:
12   cmake ${srcdir} # in build dir
14 Now, all versions:
15   make
16   make check
17   make install # as root
18   ldconfig # as root
20 Win32
21 -----
23 If you use Microsoft Visual C++ (7.1 or later) compiler, you can build 
24 GEOS using NMAKE program and provided makefile.vc files.
26 If you are building from SVN checkout, first run: autogen.bat
27 Then:
29   nmake /f makefile.vc MSVC_VER=1400
31 where 1400 is version number of Visual C++ compiler, here Visual C++ 8.0 
32 from Visual Studio 2005 (supported versions are 1300, 1310, 1400 and 1500). 
33 The bootstrap.bat step is required to generate a couple of header files.
35 In order to build debug configuration of GEOS, additional flag DEBUG=1 
36 is required:
38   nmake /f makefile.vc MSVC_VER=1400 DEBUG=1
41 CLIENT APPLICATIONS
42 ===================
44 Using the C interface (recommended)
45 -----------------------------------
47 To compile programs against the C lib (recommended):
49   CFLAGS += `geos-config --cflags`
50   LDFLAGS += `geos-config --ldflags` -lgeos_c
51   #include <geos_c.h>
53 Example usage:
55   capi/geostest.c contains basic usage examples.
57 Using the C++ interface (discouraged)
58 -------------------------------------
60 NB: The C++ interface should not be used directly; the geos project
61 views it as a bug for another program to use the C++ interface or even
62 to directly link against the C++ library.  The C++ library name will
63 change on every minor release because it is too hard to know if there
64 have been ABI changes.  (The C libary uses the C++ interface, but the
65 C library follows normal ABI-change-sensitive versioning, so programs
66 that link only against the C library should work without relinking
67 when geos is upgraded.)
69 To compile programs against the C++ lib:
71   CFLAGS += `geos-config --cflags`
72   LDFLAGS += `geos-config --ldflags` -lgeos
73   #include <geos.h>
75 Example usage:
77   doc/example.cpp contains basic usage examples.
79 Scripting language bindings
80 ---------------------------
82 Ruby bindings are fully supported. To build, use the --enable-ruby option
83 when configuring:
85   ./configure ... --enable-ruby
87 PHP bindings are fully supported. To build, use the --enable-php option
88 when configuring:
90   ./configure ... --enable-php
91     
92 Since version 3.0, the Python bindings are unsupported. Recommended options:
94  1. Become or recruit a new maintainer.
95  2. Use Shapely (http://pypi.python.org/pypi/Shapely) with Python
96     versions 2.4 or greater.
97  3. Simply call functions from libgeos_c via Python ctypes.
99 DOCUMENTATION
100 =============
102   cd doc; make doxygen-html
104   http://trac.osgeo.org/geos