static libraries - Compiling C Library for iOS 9 From Command Line, Xcode 7-beta 2 -


i having trouble compiling c library (gmp) ios 9 using latest xcode 7-beta clang. trying produce bitcode warnings in xcode stop (and produce these libraries in bitcode). however, can't compile library in first place. ./configure fails, , after looking @ config.log, seems ld problem failing "ld: library not found -lsystem". here command have used compile gmp in past :

./configure cc=clang cpp="/applications/xcode-beta.app/contents/developer/toolchains/xcodedefault.xct‌​oolchain/usr/bin/clang -e" cppflags="-isysroot /applications/xcode-beta.app/contents/developer/platforms/iphoneos.platform/deve‌​loper/sdks/iphoneos.sdk/ -l /applications/xcode-beta.app/contents/developer/platforms/iphoneos.platform/deve‌​loper/sdks/iphoneos.sdk/usr/lib/ -miphoneos-version-min=7.0 -arch armv7 -target arm-apple-darwin 

the

-l /applications/xcode-beta.app/contents/developer/platforms/iphoneos.platform/deve‌​loper/sdks/iphoneos.sdk/usr/lib/ 

flag added see if ld finding required libraries link, fails same error whether include option or not. have not include option compile bitcode in above command, i can't compile in first place using same command used use. have noticed when add gmp .a files xcode under "link binary libraries", ld can't find libraries. must manually add project ld search path in project settings ld find libraries. wasn't necessary in xcode 6, ld being buggy in current beta, or there can do?

okay, here worked. set xcode development use new compilers using

sudo xcode-select -s /applications/xcode-beta.app 

then, used configure :

./configure cc=clang cpp="/applications/xcode-beta.app/contents/developer/toolchains/xcodedefault.xctoolchain/usr/bin/clang -e" cppflags="-isysroot /applications/xcode-beta.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos.sdk/ -fembed-bitcode -miphoneos-version-min=7.0 -arch armv7 -target arm-apple-darwin" --host=aarch64-apple-darwin --disable-assembly --enable-static --disable-shared --disable-thread-safe --enable-cxx 

the above works when compiling mpfr , mpc also.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -