From c962634c7dfa5d921d6f2cdce01768e557fc79c4 Mon Sep 17 00:00:00 2001 From: Michael Weisman Date: Thu, 26 Aug 2010 19:17:33 -0700 Subject: [PATCH] Added linker flags to sample app. Uptated doc. --- Demo App/ShapeKit.xcodeproj/project.pbxproj | 10 ++++++++++ README.markdown | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Demo App/ShapeKit.xcodeproj/project.pbxproj b/Demo App/ShapeKit.xcodeproj/project.pbxproj index 9f65358..16862a3 100755 --- a/Demo App/ShapeKit.xcodeproj/project.pbxproj +++ b/Demo App/ShapeKit.xcodeproj/project.pbxproj @@ -228,6 +228,11 @@ HEADER_SEARCH_PATHS = "$(HOME)/$(SDK_DIR)/include"; INFOPLIST_FILE = "ShapeKit-Info.plist"; LIBRARY_SEARCH_PATHS = "$(HOME)/$(SDK_DIR)/lib"; + OTHER_LDFLAGS = ( + "-lgcc_eh", + "-cclib", + "-lstdc++", + ); PRODUCT_NAME = ShapeKit; }; name = Debug; @@ -242,6 +247,11 @@ HEADER_SEARCH_PATHS = "$(HOME)/$(SDK_DIR)/include"; INFOPLIST_FILE = "ShapeKit-Info.plist"; LIBRARY_SEARCH_PATHS = "$(HOME)/$(SDK_DIR)/lib"; + OTHER_LDFLAGS = ( + "-lgcc_eh", + "-cclib", + "-lstdc++", + ); PRODUCT_NAME = ShapeKit; VALIDATE_PRODUCT = YES; }; diff --git a/README.markdown b/README.markdown index d4089ac..2ad7a36 100644 --- a/README.markdown +++ b/README.markdown @@ -6,7 +6,7 @@ ShapeKit is a geometry library for iOS that aims to bridge [GEOS](http://trac.os ShapeKit uses the MKShape Geometries (MKPolygon, MKPointAnnotation, MKPolyline) which were added to MapKit in iOS 4.0. It has been tested on the iPhone, and will most likely just work on the iPad when iOS 4 is released for it. -ShapeKit depends on GEOS. There is a build script in GEOS which will automate building the library for both ARM and x86 (simulator) and will copy the libraries and headers to ~/Developer. To use it, [download GEOS](http://download.osgeo.org/geos/geos-3.2.2.tar.bz2) and copy the build script to the geos source directory. Then simply run `sh build_ios device && make clean && build_ios simulator` to install the libraries and headers to ~/Developer. Next, drag one copy each of libgeos.a and libgeos_c.a to the Frameworks folder in your project's Xcode window. Finally, double-click on the project's Target and in the Build tab of the Info window that pops up, add `$(HOME)/$(SDK_DIR)/include` to the Header Search Path, and `$(HOME)/$(SDK_DIR)/lib` to the Library Search Path. Now Xcode should be able to find the GEOS library. +ShapeKit depends on GEOS. There is a build script in GEOS which will automate building the library for both ARM and x86 (simulator) and will copy the libraries and headers to ~/Developer. To use it, [download GEOS](http://download.osgeo.org/geos/geos-3.2.2.tar.bz2) and copy the build script to the geos source directory. Then simply run `sh build_ios device && make clean && sh build_ios simulator` to install the libraries and headers to ~/Developer. Next, drag one copy each of libgeos.a and libgeos_c.a to the Frameworks folder in your project's Xcode window. Finally, double-click on the project's Target and in the Build tab of the Info window that pops up, add `$(HOME)/$(SDK_DIR)/include` to the Header Search Path, and `$(HOME)/$(SDK_DIR)/lib` to the Library Search Path. Now Xcode should be able to find the GEOS library. Finally, in the Other Linker Flags build setting, add "-lgcc_eh -cclib -lstc++" to link with the necessary libraries. ## Features @@ -32,7 +32,7 @@ ShapeKit depends on GEOS. There is a build script in GEOS which will automate bu `ShapeKitGeometry *polygon = [[ShapeKitGeometry alloc] initWithWKT:@"POLYGON((-1 -1, -1 1, 1 1, 1 -1, -1 -1))"];` - `[polygon contains:myPoint] \\ Returns YES` + `[polygon containsGeometry:myPoint] \\ Returns YES` ## Usage