I am using the chilkat libs as instructed at http://www.chilkatsoft.com/downloads_ios.asp and I am encountering the follwoing error like other persons as well. I am developing for iOS only , but receive the following error:
ld: in /Users/.../lib/libchilkatIos.a(CkoCrypt2.o), building for iOS simulator, but linking in object file built for OSX, for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am using the following script at the BUILD PHASES / RUN SCRIPT section at Xcode 7 to create one universal lib ( that worked fine at xcode 6.4 ) :
cd lib /usr/bin/libtool -static i386/libchilkatIos.a x86_64/libchilkatIos.a armv7s/libchilkatIos.a armv7/libchilkatIos.a arm64/libchilkatIos.a -o libchilkatIos.a cd ..
Can somone help, please ? It´s really urgent !
asked Sep 17 '15 at 07:32
Note: The iOS 9 version should be for iOS 6.0 and above. The important thing is that bitcode is enabled on this build, and that it's built using Xcode 7.
answered Sep 21 '15 at 12:12
You provided this additional information in private email, and I think this is the solution:
I think the individual libs are fine. For example, i386/libchilkatIos.a is correctly compiled with LC_VERSION_MIN_MACOSX and armv7s/libchilkatIos.a is correctly compiled with LC_VERSION_MIN_IPHONEOS. I think the solution is to produce two separate "universal" libs:
You would run two libtool commands:
/usr/bin/libtool -static i386/libchilkatIos.a x86_64/libchilkatIos.a -o libchilkatSimIos.a /usr/bin/libtool -static armv7s/libchilkatIos.a armv7/libchilkatIos.a arm64/libchilkatIos.a -o libchilkatIos.a
answered Sep 17 '15 at 10:11