Skip to content

Commit

Permalink
Clarify problems with linking against C++ api (libgeos#553)
Browse files Browse the repository at this point in the history
Path by Greg Troxel.

git-svn-id: http://svn.osgeo.org/geos/trunk@3663 5242fede-7e19-0410-aef8-94bd7d2200fb
  • Loading branch information
Sandro Santilli committed Jun 6, 2012
1 parent e264326 commit f7c1636
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ Example usage:
Using the C++ interface (discouraged)
-------------------------------------

NB: The C++ interface should not be used directly; the geos project
views it as a bug for another program to use the C++ interface or even
to directly link against the C++ library. The C++ library name will
change on every minor release because it is too hard to know if there
have been ABI changes. (The C libary uses the C++ interface, but the
C library follows normal ABI-change-sensitive versioning, so programs
that link only against the C library should work without relinking
when geos is upgraded.)

To compile programs against the C++ lib:

CFLAGS += `geos-config --cflags`
Expand Down
4 changes: 4 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ INCLUDES = -I$(top_srcdir)/include

lib_LTLIBRARIES = libgeos.la

# libgeos uses -release because it is not feasible to know if the ABI
# has changed between releases; the project chooses not to expend the
# effort to determine this because depending programs should not be
# using the C++ library.
libgeos_la_LDFLAGS = \
-release @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@ \
-no-undefined
Expand Down

0 comments on commit f7c1636

Please sign in to comment.