I'm following this tutorial in order to create an iOS framework (in order to support older than iOS8).
It all went just fine.
The problem started when I made a step forward and tried to use 'Cocoapods' to get 3rd party libs which my framework is depended on.
When trying to build the aggregate target, I get the following error:
Libtool /Users/me/Library/Developer/Xcode/DerivedData/testFrameworkJverkoey-etqkesvvsfnndbdcydkphdythnve/Build/Products/Debug-iphoneos/libmyFramework.a normal armv7
cd /Users/me/Dev/testFrameworkJverkoey
export IPHONEOS_DEPLOYMENT_TARGET=8.1
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/local/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Tools:/Users/me/.rvm/gems/ruby-2.1.1/bin:/Users/me/.rvm/gems/ruby-2.1.1#global/bin:/Users/me/.rvm/rubies/ruby-2.1.1/bin:/Users/me/.rvm/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/Library/PostgreSQL/9.2/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/CrossPack-AVR/bin:/usr/bin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only armv7 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -L/Users/me/Library/Developer/Xcode/DerivedData/testFrameworkJverkoey-etqkesvvsfnndbdcydkphdythnve/Build/Products/Debug-iphoneos -filelist /Users/me/Library/Developer/Xcode/DerivedData/testFrameworkJverkoey-etqkesvvsfnndbdcydkphdythnve/Build/Intermediates/testFrameworkJverkoey.build/Debug-iphoneos/myFramework.build/Objects-normal/armv7/myFramework.LinkFileList -ObjC -ObjC -lPods-AFNetworking -lPods-RestKit -lPods-SOCKit -lPods-TransitionKit -framework CFNetwork -framework CoreData -framework CoreGraphics -framework MobileCoreServices -framework Security -framework SystemConfiguration -lPods -o /Users/me/Library/Developer/Xcode/DerivedData/testFrameworkJverkoey-etqkesvvsfnndbdcydkphdythnve/Build/Products/Debug-iphoneos/libmyFramework.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: -dynamic not specified the following flags are invalid: -ObjC -ObjC
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lPods-AFNetworking
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lPods-AFNetworking is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lPods-RestKit
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lPods-RestKit is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lPods-SOCKit
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lPods-SOCKit is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lPods-TransitionKit
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lPods-TransitionKit is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lPods
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lPods is not an object file (not allowed in a library)
** BUILD FAILED **
The following build commands failed:
Libtool /Users/me/Library/Developer/Xcode/DerivedData/testFrameworkJverkoey-etqkesvvsfnndbdcydkphdythnve/Build/Products/Debug-iphoneos/libmyFramework.a normal armv7
(1 failure)
Related
I am getting the following error while running the code.I have recently updated my xcode to xcode 7.
Ld /Users/anurajennai/Library/Developer/Xcode/DerivedData/cdm_player_ios-cvwkkaawlnzyccamzriqmgoezgqi/Build/Products/Debug-iphoneos/cdm_reference_player.app/cdm_reference_player normal armv7
cd /Users/anurajennai/Desktop/myApps/unziped/cdm_player_xcode_template
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk -L/Users/anurajennai/Library/Developer/Xcode/DerivedData/cdm_player_ios-cvwkkaawlnzyccamzriqmgoezgqi/Build/Products/Debug-iphoneos -L/Users/anurajennai/Library/Developer/Xcode/DerivedData/cdm_player_ios-cvwkkaawlnzyccamzriqmgoezgqi/Build/Products/Debug -L/Users/anurajennai/Desktop/myApps/unziped/cdm_player_xcode_template/oemcrypto_tfit_ios/dev -F/Users/anurajennai/Library/Developer/Xcode/DerivedData/cdm_player_ios-cvwkkaawlnzyccamzriqmgoezgqi/Build/Products/Debug-iphoneos -F/Users/anurajennai/Desktop/myApps/unziped/cdm_player_xcode_template/oemcrypto_tfit_ios/dev -F/Users/anurajennai/Desktop/myApps/unziped/cdm_player_xcode_template/oemcrypto_tfit_ios_dylib/dev -F/Users/anurajennai/Desktop/myApps/unziped/cdm_player_xcode_template/oemcrypto_tfit_ios_dylib/release -filelist /Users/anurajennai/Library/Developer/Xcode/DerivedData/cdm_player_ios-cvwkkaawlnzyccamzriqmgoezgqi/Build/Intermediates/cdm_player_ios.build/Debug-iphoneos/cdm_reference_player.build/Objects-normal/armv7/cdm_reference_player.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -miphoneos-version-min=7.0 -fembed-bitcode-marker -fobjc-arc -fobjc-link-runtime -framework oemcrypto_tfit2-eit_release_dylib /Users/anurajennai/Library/Developer/Xcode/DerivedData/cdm_player_ios-cvwkkaawlnzyccamzriqmgoezgqi/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a /Users/anurajennai/Library/Developer/Xcode/DerivedData/cdm_player_ios-cvwkkaawlnzyccamzriqmgoezgqi/Build/Products/Debug-iphoneos/libCocoaHTTPServer.a /Users/anurajennai/Library/Developer/Xcode/DerivedData/cdm_player_ios-cvwkkaawlnzyccamzriqmgoezgqi/Build/Products/Debug-iphoneos/libTBXML-iOS.a -framework AVFoundation -framework CFNetwork -framework CoreFoundation -framework CoreGraphics -framework CoreMedia -framework Foundation -framework Security -framework UIKit -framework oemcrypto_tfit2-eit_dev_dylib -framework oemcrypto_tfit2_dev_dylib_sim -Xlinker -dependency_info -Xlinker /Users/anurajennai/Library/Developer/Xcode/DerivedData/cdm_player_ios-cvwkkaawlnzyccamzriqmgoezgqi/Build/Intermediates/cdm_player_ios.build/Debug-iphoneos/cdm_reference_player.build/Objects-normal/armv7/cdm_reference_player_dependency_info.dat -o /Users/anurajennai/Library/Developer/Xcode/DerivedData/cdm_player_ios-cvwkkaawlnzyccamzriqmgoezgqi/Build/Products/Debug-iphoneos/cdm_reference_player.app/cdm_reference_player
ld: '/Users/anurajennai/Desktop/myApps/unziped/cdm_player_xcode_template/oemcrypto_tfit_ios_dylib/release/oemcrypto_tfit2-eit_release_dylib.framework/oemcrypto_tfit2-eit_release_dylib' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
EDIT
see this image.In the error log,it says
oemcrypto_tfit2-eit_release_dylib' does not contain bitcode
do which one do I have to set "NO" and which one to "YES"?
after changing BITCODE setting(if both debug and release are NO,the same error is coming)
ld: warning: ignoring file /Users/anurajennai/Desktop/myApps/unziped/cdm_player_xcode_template/oemcrypto_tfit_ios_dylib/release/oemcrypto_tfit2-eit_release_dylib.framework/oemcrypto_tfit2-eit_release_dylib, missing required architecture i386 in file /Users/anurajennai/Desktop/myApps/unziped/cdm_player_xcode_template/oemcrypto_tfit_ios_dylib/release/oemcrypto_tfit2-eit_release_dylib.framework/oemcrypto_tfit2-eit_release_dylib (2 slices)
ld: warning: ignoring file /Users/anurajennai/Desktop/myApps/unziped/cdm_player_xcode_template/oemcrypto_tfit_ios/dev/oemcrypto_tfit2-eit_dev_dylib.framework/oemcrypto_tfit2-eit_dev_dylib, missing required architecture i386 in file /Users/anurajennai/Desktop/myApps/unziped/cdm_player_xcode_template/oemcrypto_tfit_ios/dev/oemcrypto_tfit2-eit_dev_dylib.framework/oemcrypto_tfit2-eit_dev_dylib (2 slices)
ld: embedded dylibs/frameworks are only supported on iOS 8.0 and later (#rpath/oemcrypto_tfit2_dev_dylib_sim.framework/oemcrypto_tfit2_dev_dylib_sim) for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
oemcrypto_tfit2-eit_release_dylib.framework/oemcrypto_tfit2-eit_release_dylib
Doesn't contain bitcode, either ask the vendor of this library to provide bit code or disable bitcode for this project
Please read the error message again:
'oemcrypto_tfit2-eit_release_dylib.framework/oemcrypto_tfit2-eit_release_dylib' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7
As far as I can see you have already solved problem with Bitcode, so my answer only about last error messages:
ld: warning: ignoring file /Users/anurajennai/Desktop/myApps/unziped/cdm_player_xcode_template/oemcrypto_tfit_ios_dylib/release/oemcrypto_tfit2-eit_release_dylib.framework/oemcrypto_tfit2-eit_release_dylib, missing required architecture i386 in file
means that lib doesn't have i386 arch (can't be used on simulator) try build for iOS device
second one:
ld: embedded dylibs/frameworks are only supported on iOS 8.0 and later
but I see that in your project:
export IPHONEOS_DEPLOYMENT_TARGET=7.0
deployment target set to 7.0 so you should decide something with it
After a whole day I've fixed tens of error in a legacy project, but I'm blocked by this annoying problem. I've searched a lot on the web but cannot get a relevant answer to this.
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: -dynamic not specified the following flags are invalid: -ObjC -ObjC
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -licucore
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -licucore is not an object file (not allowed in a library)
Should I modify something in Build Settings or Build Phases, or somewhere in CocoaPods???
Add: Error happens on building a target and here are all the error info:
Libtool /Users/wangshudao/Library/Developer/Xcode/DerivedData/Diana-gfwxapulgdvudifuftotddpukijd/Build/Products/Debug-iphonesimulator/libDianaModels.a normal x86_64
cd /Volumes/HDD/Dev/workplace/iOS/Diana
export IPHONEOS_DEPLOYMENT_TARGET=6.1
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only x86_64 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.2.sdk -L/Users/wangshudao/Library/Developer/Xcode/DerivedData/Diana-gfwxapulgdvudifuftotddpukijd/Build/Products/Debug-iphonesimulator -filelist /Users/wangshudao/Library/Developer/Xcode/DerivedData/Diana-gfwxapulgdvudifuftotddpukijd/Build/Intermediates/Diana.build/Debug-iphonesimulator/DianaModels.build/Objects-normal/x86_64/DianaModels.LinkFileList -ObjC -lPods-Model-AFNetworking -lPods-Model-Mantle -lPods-Model-ReactiveCocoa -lPods-Model-SSKeychain -lPods-Model-TMCache -licucore -framework AVOSCloud -framework CFNetwork -framework CoreGraphics -framework CoreLocation -framework CoreTelephony -framework Foundation -framework MobileCoreServices -framework QuartzCore -framework Security -framework SystemConfiguration -weak_framework UIKit -ObjC -lPods-Model-AFNetworking -lPods-Model-Mantle -lPods-Model-ReactiveCocoa -lPods-Model-SSKeychain -lPods-Model-TMCache -licucore -framework AVOSCloud -framework CFNetwork -framework CoreGraphics -framework CoreLocation -framework CoreTelephony -framework Foundation -framework MobileCoreServices -framework QuartzCore -framework Security -framework SystemConfiguration -weak_framework UIKit -framework SystemConfiguration -framework MobileCoreServices -framework Foundation -lPods-Model -o /Users/wangshudao/Library/Developer/Xcode/DerivedData/Diana-gfwxapulgdvudifuftotddpukijd/Build/Products/Debug-iphonesimulator/libDianaModels.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: -dynamic not specified the following flags are invalid: -ObjC -ObjC
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -licucore
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -licucore is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -licucore
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -licucore is not an object file (not allowed in a library)
I fixed this by removing all the -l"icucore" in all the Pods.XXX.xcconfig files. They are auto-generated by the CocoaPods and I don't know how to control the these linker flags. Whatever, it works now...
It's the command line option to the linker to tell it to link in libicucore.a (probably; but could also potentially be libicucore.dylib, but not likely under iOS).
You have to supply the library in order to fix the error.
Other potential reasons for the failure are:
Not including the directory containing the library in any -L command line options.
The "fat" library file not including the necessary CPU architecture, although the linker will produce a slightly different error message in that case.
See this manpage, although it's somewhat out-of-date (I cannot find Apple's current manpage for ld).
Try to add -licucore flag in Other Linker Flags in your project's target Build Settings. It may solve your problem.
I came across similar error with RegexKitLite, and I fixed with this settings:
Compiling my main target (not a test target like here) yields this error:
ld: warning: Auto-Linking supplied
'~/Documents/my_app/MyApp/Crashlytics.framework/Crashlytics',
framework linker option at
~/Documents/my_app/MyApp/Crashlytics.framework/Crashlytics
is not a dylib
From this build command:
Ld /Build/Products/Debug-iphonesimulator/MyApp.app/MyApp normal i386
cd ~/Documents/my_app/MyApp
export IPHONEOS_DEPLOYMENT_TARGET=8.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.2.sdk -L~/Library/Developer/Xcode/DerivedData/MyApp-dbmrsjmskpqxmnegayfzfxgcwvsm/Build/Products/Debug-iphonesimulator -F~/Library/Developer/Xcode/DerivedData/MyApp-dbmrsjmskpqxmnegayfzfxgcwvsm/Build/Products/Debug-iphonesimulator -F~/Documents/my_app/MyApp -filelist ~/Library/Developer/Xcode/DerivedData/MyApp-dbmrsjmskpqxmnegayfzfxgcwvsm/Build/Intermediates/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/i386/MyApp.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -ObjC -lPods-CocoaLumberjack -lPods-Mantle -framework CFNetwork -framework Foundation -framework Security -framework SystemConfiguration -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=8.0 -framework CoreGraphics -lPods -framework MapKit -framework Fabric -lPods-MyApp -Xlinker -dependency_info -Xlinker ~/Library/Developer/Xcode/DerivedData/MyApp-dbmrsjmskpqxmnegayfzfxgcwvsm/Build/Intermediates/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/i386/MyApp_dependency_info.dat -o ~/Library/Developer/Xcode/DerivedData/MyApp-dbmrsjmskpqxmnegayfzfxgcwvsm/Build/Products/Debug-iphonesimulator/MyApp.app/MyApp
The Missing Link:
This error is almost always produced by not having the binary linked to the library (In this case it would be the Crashlytics.framework):
Trying to build the target MyApp (which includes headers with #import <Crashlytics/Crashlytics.h> will produce the error:
ld: warning: Auto-Linking supplied
'../../Crashlytics.framework/Crashlytics', framework linker option at
../../Crashlytics.framework/Crashlytics is not a dylib
Link the Framework:
Fortunately, it should be easy to fix the problem simply by dragging the Crashlytics.framework from the Frameworks folder in the project navigator into the list of Link Binary With Libraries or by using the +.
Make sure you have your App selected/highlighted under Targets while doing this process.
I had the same issue but my reason was different.
Error Output
ld: warning: Auto-Linking supplied '~/GameFolder/Pods/Fabric/tvOS/Fabric.framework/Fabric', framework linker option at ~/GameFolder/Pods/Fabric/tvOS/Fabric.framework/Fabric is not a dylib
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_Answers", referenced from:
type metadata accessor for __ObjC.Answers in GameScene.o
type metadata accessor for __ObjC.Answers in AppDelegate.o
"_OBJC_CLASS_$_Crashlytics", referenced from:
type metadata accessor for __ObjC.Crashlytics in AppDelegate.o
"_OBJC_CLASS_$_Fabric", referenced from:
type metadata accessor for __ObjC.Fabric in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Reason
My target was overriding the OTHER_LDFLAGS.
Solution
Changed the OTHER_LDFLAGS to just inherit the Linker Flags. Basically, changed it to $(inherited)
I followed all steps provided by #i'L'i but I was not able to find Crashlytics.framework and Fabric.framework file in build phases.
So this helped me.
Step 1: Follow all the steps given Here.
Step 2: Now when you are unable to find Crashlytics.framework and Fabric.framework files in Link Binary With Libraries by clicking + do following.
2.1: Click on + button in Link Binary With Libraries.
2.2: Click on Add Other... button.
2.3: Now chose Crashlytic.framework and Fabric.framework from Pod folder - if using cocoapods, else choose both file from where you have downloaded it.
Step 3: Build Succeeded, Enjoy. :)
For future reference, this can also happen if you link your test files to your app target.
For example:
https://github.com/realm/realm-cocoa/issues/1661
I had the same problem. Maybe I messed up the initial fabric install but once I added Fabric.framework to the list of frameworks (should be in the root folder of your app by default) everything worked.
Conversely to what I'L'I and user3517250 mention, the problem might also be that you have #import statements that shouldn't be there.
Xcode does infer the frameworks to link against from the #import statements. If you import a framework that you don't link against, then you get this warning.
I'm trying to build a framework(Valid Architectures in my settings are arm64, armv7, armv7s, $(ARCHS_STANDARD), i386) and my Xcode project is throwing out these warnings at me. The project builds successfully but I want to get these resolved. If someone can at least guide me what are the reasons for these warnings, I will try to get them resolved.
THis is what Xcode have passed for the Ld
Ld /Users/panisetty/Library/Developer/Xcode/DerivedData/ABDWorkspace-dzxyvnbxeuwterbtlrwhpsjsxrwm/Build/Intermediates/ABD.build/Debug-iphoneos/ABDDistCoreFramework.build/Objects-normal/armv7/ABDDistCoreFramework normal armv7
cd /Users/panisetty/Documents/Code/Stash/CoreWorkspace/ABD
export IPHONEOS_DEPLOYMENT_TARGET=6.1
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -r -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -L/Users/panisetty/Library/Developer/Xcode/DerivedData/ABDWorkspace-dzxyvnbxeuwterbtlrwhpsjsxrwm/Build/Products/Debug-iphoneos -F/Users/panisetty/Library/Developer/Xcode/DerivedData/ABDWorkspace-dzxyvnbxeuwterbtlrwhpsjsxrwm/Build/Products/Debug-iphoneos -F/Users/panisetty/Library/Developer/Xcode/DerivedData/ABDWorkspace-bbwocslpbrwjhbfdlqwaweghxrof/Build/Products/Debug-iphonesimulator -F/Users/panisetty/Documents/Code/Stash/CoreWorkspace/ABD -F/Users/panisetty/Documents/Code/Stash/CoreWorkspace/ABD/CoreFramework/StoreLocator -filelist /Users/panisetty/Library/Developer/Xcode/DerivedData/ABDWorkspace-dzxyvnbxeuwterbtlrwhpsjsxrwm/Build/Intermediates/ABD.build/Debug-iphoneos/ABDDistCoreFramework.build/Objects-normal/armv7/ABDDistCoreFramework.LinkFileList -nostdlib -ObjC -fobjc-arc -fobjc-link-runtime -fprofile-arcs -ftest-coverage -miphoneos-version-min=6.1 -framework CFNetwork -framework MobileCoreServices -framework GLKit -framework Security -framework CoreGraphics -framework CoreLocation -framework CoreData -framework AVFoundation -framework GoogleMaps -framework SystemConfiguration -framework CoreText -framework CoreFoundation -framework OpenGLES -framework ImageIO -Xlinker -dependency_info -Xlinker /Users/panisetty/Library/Developer/Xcode/DerivedData/ABDWorkspace-dzxyvnbxeuwterbtlrwhpsjsxrwm/Build/Intermediates/ABD.build/Debug-iphoneos/ABDDistCoreFramework.build/Objects-normal/armv7/ABDDistCoreFramework_dependency_info.dat -o /Users/panisetty/Library/Developer/Xcode/DerivedData/ABDWorkspace-dzxyvnbxeuwterbtlrwhpsjsxrwm/Build/Intermediates/ABD.build/Debug-iphoneos/ABDDistCoreFramework.build/Objects-normal/armv7/ABDDistCoreFramework
ld: warning: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks//CFNetwork.framework/CFNetwork, ignoring unexpected dylib file
ld: warning: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks//MobileCoreServices.framework/MobileCoreServices, ignoring unexpected dylib file
ld: warning: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks//GLKit.framework/GLKit, ignoring unexpected dylib file
ld: warning: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks//Security.framework/Security, ignoring unexpected dylib file
ld: warning: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks//CoreGraphics.framework/CoreGraphics, ignoring unexpected dylib file
ld: warning: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks//CoreLocation.framework/CoreLocation, ignoring unexpected dylib file
ld: warning: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks//CoreData.framework/CoreData, ignoring unexpected dylib file
ld: warning: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks//AVFoundation.framework/AVFoundation, ignoring unexpected dylib file
ld: warning: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks//SystemConfiguration.framework/SystemConfiguration, ignoring unexpected dylib file
ld: warning: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks//CoreText.framework/CoreText, ignoring unexpected dylib file
ld: warning: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks//CoreFoundation.framework/CoreFoundation, ignoring unexpected dylib file
ld: warning: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks//OpenGLES.framework/OpenGLES, ignoring unexpected dylib file
ld: warning: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks//ImageIO.framework/ImageIO, ignoring unexpected dylib file
I wanted to use the Pax86 library for iOS. Intially I tried creating the library manually, as I had all the required files. But it consists of file with code to create a static library which can be run on the terminal but only for iPhonesdk4.3. Since I have the iPhonesdk7.1 I was not able to create the Pax86 library. I do not have a system with iPhonesdk4.3. A static library build on iPhoneSDK4.3 was later provided.
I added the static library (.a) file to a new project also included the "include" file of pax86 to the new app.
When i try calling any method related to pax86, error occurs as mentioned below:
For Simulator:
Ld /Users/xyz/Library/Developer/Xcode/DerivedData/abc-dvbzzlhzahggryayfurclxrbdjio/Build/Products/Debug-iphonesimulator/abc.app/abc normal i386
cd /Users/xyz/Documents/Sample_programs/abc
export IPHONEOS_DEPLOYMENT_TARGET=7.1
export PATH="/Users/xyz/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Users/ramani/Documents/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Users/xyz/Documents/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Users/xyz/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -L/Users/xyz/Library/Developer/Xcode/DerivedData/abc-dvbzzlhzahggryayfurclxrbdjio/Build/Products/Debug-iphonesimulator -L/Users/xyz/Documents/Sample_programs/abc/abc -L/Users/xyz/Documents/Sample_programs/abc/abc -F/Users/xyz/Library/Developer/Xcode/DerivedData/abc-dvbzzlhzahggryayfurclxrbdjio/Build/Products/Debug-iphonesimulator -filelist /Users/xyz/Library/Developer/Xcode/DerivedData/abc-dvbzzlhzahggryayfurclxrbdjio/Build/Intermediates/abc.build/Debug-iphonesimulator/abc.build/Objects-normal/i386/Shell.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.1 -framework CoreLocation -framework CoreGraphics -lpax86 -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/xyz/Library/Developer/Xcode/DerivedData/abc-dvbzzlhzahggryayfurclxrbdjio/Build/Intermediates/abc.build/Debug-iphonesimulator/Shell.build/Objects-normal/i386/abc_dependency_info.dat -o /Users/xyz/Library/Developer/Xcode/DerivedData/abc-dvbzzlhzahggryayfurclxrbdjio/Build/Products/Debug-iphonesimulator/abc.app/abc
ld: warning: ignoring file /Users/xyz/Documents/Sample_programs/abc/abc/libpax86.a, file was built for archive which is not the architecture being linked (i386): /Users/xyz/Documents/Sample_programs/abc/abc/libpax86.a
Undefined symbols for architecture i386:
"_retro_api_version", referenced from:
-[ViewController viewDidLoad] in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
For Device:
Ld /Users/xyz/Library/Developer/Xcode/DerivedData/Shell-dvbzzlhzahggryayfurclxrbdjio/Build/Products/Debug-iphoneos/abc.app/Shell normal armv7
cd /Users/ramani/Documents/Sample_programs/Shell
export IPHONEOS_DEPLOYMENT_TARGET=7.1
export PATH="/Users/xyz/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Users/ramani/Documents/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Users/xyz/Documents/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Users/xyz/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk -L/Users/ramani/Library/Developer/Xcode/DerivedData/abc-dvbzzlhzahggryayfurclxrbdjio/Build/Products/Debug-iphoneos -L/Users/xyz/Documents/Sample_programs/abc/abc -L/Users/xyz/Documents/Sample_programs/abc/abc -F/Users/xyz/Library/Developer/Xcode/DerivedData/abc-dvbzzlhzahggryayfurclxrbdjio/Build/Products/Debug-iphoneos -filelist /Users/xyz/Library/Developer/Xcode/DerivedData/abc-dvbzzlhzahggryayfurclxrbdjio/Build/Intermediates/abc.build/Debug-iphoneos/Shell.build/Objects-normal/armv7/Shell.LinkFileList -dead_strip -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=7.1 -framework CoreLocation -framework CoreGraphics -lpax86 -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/xyz/Library/Developer/Xcode/DerivedData/abc-dvbzzlhzahggryayfurclxrbdjio/Build/Intermediates/abc.build/Debug-iphoneos/Shell.build/Objects-normal/armv7/abc_dependency_info.dat -o /Users/xyz/Library/Developer/Xcode/DerivedData/abc-dvbzzlhzahggryayfurclxrbdjio/Build/Products/Debug-iphoneos/abc.app/abc
ld: archive has no table of contents file '/Users/xyz/Documents/Sample_programs/abc/abc/libpax86.a' for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have set "Build Active Architecture" to both "YES" and "NO" removed all other architecture like armv7s, arm64 etc but still the above mentioned issues occur.
I have even added the .a file to usr/lib and then added it in Build Settings. cleared the Library Search Path and Framework Search Path.
I imported the static libary as present in the screenshot attached, and tried even without the "include".
Could you please help me resolve this issue. Is it because the static library is only meant for iPhoneSDK4.3 and not iPhoneSDK7.1 or any other SDK. I have tried it in iPhoneSDK3.2 as well, but no luck.
Please help.
Thanks in advance.
The static library was built for iPhone SDK 4.3, and will only work with that. It probably contains symbols for architecture armv6 only, while you are trying to use in i386 (simulator) and armv7/armv7s/arm64 (devices).
Your solution is to build that library using newer SDKs.