gstf / libspatialite-ios

libspatialite compiled for iOS
55 stars 48 forks source link

Including libraries in Xcode Project #1

Closed davidchiles closed 10 years ago

davidchiles commented 11 years ago

I was able to make the binaries but when I included them in Xcode I had a lot of compile errors. I was hoping you could point me in the right direction or maybe a bit more documentation.

gstf commented 11 years ago

What kind of errors? This was more of an experiment for me, don't know if I will spend any more time on this.

davidchiles commented 11 years ago

I may be a mistake on how I add it to my project

I add two folders include and lib and then #import "spatialite.h"and spatialite_init (1);

The errors then are Apple Mach-O linker error about 54 of them possibly related to armv7 architecture

here's a sample

Undefined symbols for architecture armv7:
    "std::__1::basic_ostream<char, std::__1::char_traits<char> >::flush()", referenced from:
    std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in libgeos.a(EdgeRing.o)
    "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::assign(char const*)", referenced from:
    geos::io::CLocalizer::CLocalizer() in libgeos.a(CLocalizer.o)
    geos::io::Writer::Writer() in libgeos.a(Writer.o)
    "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::append(char const*)", referenced from:
    geos::io::WKTWriter::appendCoordinate(geos::geom::Coordinate const*, geos::io::Writer*) in libgeos.a(WKTWriter.o)
    geos::operation::valid::TopologyValidationError::toString() in libgeos.a(TopologyValidationError.o)
    geos::geom::CoordinateArraySequence::toString() const in libgeos.a(CoordinateArraySequence.o)
    geos::geomgraph::DirectedEdgeStar::print() in libgeos.a(DirectedEdgeStar.o)
    geos::operation::relate::EdgeEndBundle::print() in libgeos.a(EdgeEndBundle.o)
    "std::__1::basic_streambuf<char, std::__1::char_traits<char> >::basic_streambuf()", referenced from:
    geos::io::WKTWriter::toLineString(geos::geom::Coordinate const&, geos::geom::Coordinate const&) in libgeos.a(WKTWriter.o)
    geos::io::WKTWriter::writeNumber(double) in libgeos.a(WKTWriter.o)
    geos::geom::IntersectionMatrix::matches(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const in 
muellermartin commented 11 years ago

I also encountered this issue, but after a long time of research I was able to solve this issue:

I'll try to write an article as soon as possible on my blog with a more detailed solution write-up.

gstf commented 10 years ago

Please post a link here @muellermartin when/if you write a blog article. Closing this issue now as you've seemed to have found a solution.