barrycug/iOSGoogleMapLayer — Issue #1: Linker error with Xcode 4.2 and ArcGIS SDK 2.1
Author: sangshuduo
Created: 2011-12-13 15:21:48+00:00
State: open

This project sounds cool. I tried to build it but got link error as below.

I use xcode 4.2 and I download ArcGIS SDK 2.1 from official web site.
With original project settings, I got 82 link errors like:

"operator delete(void*)", referenced from:
-[AGSEnvelope dealloc] in libArcGIS.a(AGSEnvelope.o)
-[AGSEnvelope dotborg] in libArcGIS.a(AGSEnvelope.o)
-[AGSMutableEnvelope updateWithXmin:ymin:xmax:ymax:] in libArcGIS.a(AGSEnvelope.o)
-[AGSSpatialReference dotborg] in libArcGIS.a(AGSGeometry.o)
-[AGSSpatialReference dealloc] in libArcGIS.a(AGSGeometry.o)
-[AGSMultipoint init] in libArcGIS.a(AGSMultipoint.o)
-[AGSMultipoint dealloc] in libArcGIS.a(AGSMultipoint.o)
...
(maybe you meant: __ZdlPvS_)
"operator new(unsigned long)", referenced from:
-[AGSEnvelope dotborg] in libArcGIS.a(AGSEnvelope.o)
-[AGSSpatialReference dotborg] in libArcGIS.a(AGSGeometry.o)
-[AGSMultipoint init] in libArcGIS.a(AGSMultipoint.o)
-[AGSPolygon init] in libArcGIS.a(AGSPolygon.o)
-[AGSPolyline init] in libArcGIS.a(AGSPolyline.o)
-[AGSCancelTracker init] in libArcGIS.a(AGSGeometryEngine.o)
-[AGSGeometryEngine init] in libArcGIS.a(AGSGeometryEngine.o)

[snipped]

After I change ‘Build settings/Compile Sources As’ from 'According to File Type' to 'Objective-C++', I still got 21 errors like

Undefined symbols for architecture i386:
"_CTFontDescriptorCreateWithAttributes", referenced from:
-[AGSTextSymbol drawGraphic:atX:y:inContext:] in libArcGIS.a(AGSTextSymbol.o)
"_CTFontCreateWithFontDescriptor", referenced from:
-[AGSTextSymbol drawGraphic:atX:y:inContext:] in libArcGIS.a(AGSTextSymbol.o)
"_CTLineCreateWithAttributedString", referenced from:
-[AGSTextSymbol drawGraphic:atX:y:inContext:] in libArcGIS.a(AGSTextSymbol.o)
"_CTLineGetTypographicBounds", referenced from:
-[AGSTextSymbol drawGraphic:atX:y:inContext:] in libArcGIS.a(AGSTextSymbol.o)
"_CTFontGetDescent", referenced from:
-[AGSTextSymbol drawGraphic:atX:y:inContext:] in libArcGIS.a(AGSTextSymbol.o)

What I should do to solve them? Thanks.