graphhopper-ios icon indicating copy to clipboard operation
graphhopper-ios copied to clipboard

Build failed for x86_64

Open Darshan-Sonigara opened this issue 6 years ago • 1 comments

ignoring file /Users/xxx/graphhopper-ios/build/libgraphhopper.a, file was built for archive which is not the architecture being linked (x86_64): /Users/xxx/graphhopper-ios/build/libgraphhopper.a

Undefined symbols for architecture x86_64

"OBJC_CLASS$_GHRequest", referenced from: objc-class-ref in Directions.o "OBJC_CLASS$_EncodingManager", referenced from: objc-class-ref in Directions.o "OBJC_CLASS$_GraphHopper", referenced from: objc-class-ref in Directions.o ld: symbol(s) not found for architecture x86_64

please help me thanks in advance

Darshan-Sonigara avatar Aug 28 '19 13:08 Darshan-Sonigara

I'm not entirely sure how xcode params are passed to the makefiles so I can't help with that. I too noticed the output was always of a wrong architecture.

When you use the makefiles directly however, you'll build a fat-library (library that includes all architectures). Include that into your project and there are no more errors.

When deploying to the appstore: Make sure to set up a "stripping" script in your build phases. There are shell scripts for it widely available online. It's essentially just a shell script that will remove unnecessary architectures (such as simulators).

JustinGanzer avatar Oct 16 '19 07:10 JustinGanzer