I'm unable to compile my project for the simulator .
I get Apple Mach-O-Linker error.I'm unable to solve this issues.I am using xcode 5.
I get the same question here How to solve Mach-O-Linker error in ios7 & Xcode 5.0.1 with right answer,but in my case there is "\" in Framework Search Path.
Ld /Users/mohit/Library/Developer/Xcode/DerivedData/Story- cfxrnsmqxnasuafarmhvchwphnxa/Build/Products/Debug-iphonesimulator/Story.app/Story normal i386
cd "/Users/mohit/Desktop/ys_xcode/YS Code/Story 34"
export IPHONEOS_DEPLOYMENT_TARGET=7.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/clang - arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/i PhoneSimulator7.1.sdk -L/Users/mohit/Library/Developer/Xcode/DerivedData/Story- cfxrnsmqxnasuafarmhvchwphnxa/Build/Products/Debug-iphonesimulator - F/Users/mohit/Library/Developer/Xcode/DerivedData/Story- cfxrnsmqxnasuafarmhvchwphnxa/Build/Products/Debug-iphonesimulator - F/Users/mohit/Documents/FacebookSDK - F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -F/Users/mohit/Desktop/ys_xcode/YS\ Code/Story\ 34 -filelist /Users/mohit/Library/Developer/Xcode/DerivedData/Story- cfxrnsmqxnasuafarmhvchwphnxa/Build/Intermediates/Story.build/Debug- iphonesimulator/Story.build/Objects-normal/i386/YourStory.LinkFileList -Xlinker - objc_abi_version -Xlinker 2 -ObjC -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.1 -framework XCTest -framework Social -framework CoreData - framework GoogleOpenSource -framework CoreMotion -framework AssetsLibrary -framework AddressBook -framework FacebookSDK -lxml2 -framework GooglePlus -Xlinker -dependency_info - Xlinker /Users/mohit/Library/Developer/Xcode/DerivedData/Story- cfxrnsmqxnasuafarmhvchwphnxa/Build/Intermediates/Story.build/Debug-iphonesimulator/Story.build/Objects-normal/i386/Story_dependency_info.dat -o /Users/mohit/Library/Developer/Xcode/DerivedData/Story- cfxrnsmqxnasuafarmhvchwphnxa/Build/Products/Debug-iphonesimulator/Story.app/Story
Mach-O-Linker error message
ld: building for iOS Simulator, but linking against dylib built for MacOSX file '/Applications/Xcode.app/Contents/Developer/Library/Frameworks/XCTest.framework/XCTest' for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)]
Help is appreciated!
Related
I have taken over a Xcode project from another developer and trying to get the code up and running on my local computer.
I am getting this error:
Undefined symbols for architecture x86_64:
This is my log file from Xcode:
Ld
/Users/etiennelouw/Library/Developer/Xcode/DerivedData/TheBridesOffice-dikntijbbbpirgcsdaggnwtzafqj/Build/Products/Debug-iphonesimulator/TheBridesOffice.app/TheBridesOffice
normal x86_64
cd "/Users/etiennelouw/Downloads/App (1)/TheBridesOffice"
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.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 x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk
-L/Users/etiennelouw/Library/Developer/Xcode/DerivedData/TheBridesOffice-dikntijbbbpirgcsdaggnwtzafqj/Build/Products/Debug-iphonesimulator
-F/Users/etiennelouw/Library/Developer/Xcode/DerivedData/TheBridesOffice-dikntijbbbpirgcsdaggnwtzafqj/Build/Products/Debug-iphonesimulator
-F/Users/etiennelouw/Downloads/App\ (1)/TheBridesOffice/TheBridesOffice/Class/Addition/Parse
-F/Users/etiennelouw/Downloads/App\ (1)/TheBridesOffice/TheBridesOffice/Class/Addition/Facebook
-F/Users/etiennelouw/Documents/FacebookSDK -filelist /Users/etiennelouw/Library/Developer/Xcode/DerivedData/TheBridesOffice-dikntijbbbpirgcsdaggnwtzafqj/Build/Intermediates/TheBridesOffice.build/Debug-iphonesimulator/TheBridesOffice.build/Objects-normal/x86_64/TheBridesOffice.LinkFileList
-Xlinker -rpath -Xlinker #executable_path/Frameworks -mios-simulator-version-min=7.0 -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -lsqlite3 -framework Bolts -framework MobileCoreServices -framework FBSDKShareKit -framework ParseCrashReporting -framework
FBSDKMessengerShareKit -framework FBAudienceNetwork -framework
FBSDKCoreKit -framework ParseFacebookUtilsV4 -framework FBSDKLoginKit
-framework Parse -framework SystemConfiguration -framework AudioToolbox -framework CoreImage -framework ParseFacebookUtils
-framework QuartzCore -framework ParseUI -Xlinker -dependency_info -Xlinker /Users/etiennelouw/Library/Developer/Xcode/DerivedData/TheBridesOffice-dikntijbbbpirgcsdaggnwtzafqj/Build/Intermediates/TheBridesOffice.build/Debug-iphonesimulator/TheBridesOffice.build/Objects-normal/x86_64/TheBridesOffice_dependency_info.dat
-o /Users/etiennelouw/Library/Developer/Xcode/DerivedData/TheBridesOffice-dikntijbbbpirgcsdaggnwtzafqj/Build/Products/Debug-iphonesimulator/TheBridesOffice.app/TheBridesOffice
Undefined symbols for architecture x86_64:
"_FBSDKAppEventNameFBSessionNativeAppSwitchLoginDialogResult",
referenced from:
-[FBSDKLoginManagerLogger logNativeAppDialogResult:dialogDuration:] in
FBSDKLoginKit(FBSDKLoginManagerLogger.o)
"_FBSDKDialogConfigurationNameLogin", referenced from:
-[FBSDKLoginManager logInWithBehavior:serverConfiguration:serverConfigurationLoadError:]
in FBSDKLoginKit(FBSDKLoginManager.o)
-[FBSDKLoginManager(Native) performBrowserLogInWithParameters:handler:] in
FBSDKLoginKit(FBSDKLoginManager.o)
"_FBSDKMonotonicTimeGetCurrentSeconds", referenced from:
-[FBSDKLoginManagerLogger parametersWithTimeStampAndClientState:forAuthMethod:] in
FBSDKLoginKit(FBSDKLoginManagerLogger.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
Here is what I have under Architecture:
Architectur
Here is my Framework files that I have imported following the facebook SDK getting started guide:
Framework
It seems that your project missing dependency while linking because FBSDKLoginKit.framework is missing on linking stage.
Try to recheck you configuration via Facebook Guide - Getting Started with the Facebook SDK for iOS.
You can try rm -rf ~/Library/Developer/Xcode/DerivedData/*
I get a error message when trying to run my ios app ande Xcode 6.3 returns Apple Mach-O Linker Error. What's the problem?
I just compiled a project and Xcode 5 returns "Apple Mach-O-Linker error". How do I fix them? How to solve the problem? I am using iOS 7.
Here is the whole error:
Ld /Users/eric/Library/Developer/Xcode/DerivedData/AskingApp-ajdanpgjvvbbvuatgxrdrnwjrunp/Build/Products/Debug-iphonesimulator/AskingApp.app/AskingApp normal x86_64
cd "/Users/eric/Downloads/AskingApp20150421 2"
export IPHONEOS_DEPLOYMENT_TARGET=7.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/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.3.sdk -L/Users/eric/Library/Developer/Xcode/DerivedData/AskingApp-ajdanpgjvvbbvuatgxrdrnwjrunp/Build/Products/Debug-iphonesimulator -F/Users/eric/Library/Developer/Xcode/DerivedData/AskingApp-ajdanpgjvvbbvuatgxrdrnwjrunp/Build/Products/Debug-iphonesimulator -F/Users/eric/Downloads/AskingApp20150421\ 2/AskingApp -filelist /Users/eric/Library/Developer/Xcode/DerivedData/AskingApp-ajdanpgjvvbbvuatgxrdrnwjrunp/Build/Intermediates/AskingApp.build/Debug-iphonesimulator/AskingApp.build/Objects-normal/x86_64/AskingApp.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.1 -framework Security -framework MobileCoreServices -framework SystemConfiguration -lz -framework CFNetwork -framework Parse -framework CoreGraphics -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/eric/Library/Developer/Xcode/DerivedData/AskingApp-ajdanpgjvvbbvuatgxrdrnwjrunp/Build/Intermediates/AskingApp.build/Debug-iphonesimulator/AskingApp.build/Objects-normal/x86_64/AskingApp_dependency_info.dat -o /Users/eric/Library/Developer/Xcode/DerivedData/AskingApp-ajdanpgjvvbbvuatgxrdrnwjrunp/Build/Products/Debug-iphonesimulator/AskingApp.app/AskingApp
ld: truncated fat file. Slice from 24061796 to 30544388 is past end of file with length 30544327 file '/Users/eric/Downloads/AskingApp20150421 2/AskingApp/Parse.framework/Parse' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Anyone?
I am working with an XCode project which was fine yesterday but today without any change in code I am getting following compile error.
Any suggestion? How can i fix it?
Ld DerivedData/OEiPhone/Build/Products/Debug-iphonesimulator/Project\ Sounds.app/Project\ Sounds normal i386
cd "/Users/admin/Desktop/App 2"
export IPHONEOS_DEPLOYMENT_TARGET=6.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/Users/admin/Desktop/App\ 2/DerivedData/OEiPhone/Build/Products/Debug-iphonesimulator -L/Users/admin/Desktop/App\ 2/Classes/ListControl/OELib -L/Users/admin/Desktop/App\ 2/../../../iPad/API\'s/Google\ Analytics\ SDK/Library -L/Users/admin/Desktop/App\ 2/Classes/Analytic -LLibrary -F/Users/admin/Desktop/App\ 2/DerivedData/OEiPhone/Build/Products/Debug-iphonesimulator -filelist /Users/admin/Desktop/App\ 2/DerivedData/OEiPhone/Build/Intermediates/OEiPhone.build/Debug-iphonesimulator/Project\ Sounds.build/Objects-normal/i386/Project\ Sounds.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -licucore -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.0 -framework CoreMedia -framework AVFoundation -framework NewsstandKit -lsqlite3.0 -lz.1.2.5 -framework Foundation -framework UIKit -framework CoreGraphics -framework CFNetwork -framework QuartzCore -framework SystemConfiguration -lGoogleAnalytics_NoThumb -framework MediaPlayer -framework MessageUI -framework OpenGLES -framework CoreText -framework CoreLocation -framework MapKit -framework StoreKit -lxml2 -lGoogleAnalytics -Xlinker -dependency_info -Xlinker /Users/admin/Desktop/App\ 2/DerivedData/OEiPhone/Build/Intermediates/OEiPhone.build/Debug-iphonesimulator/Project\ Sounds.build/Objects-normal/i386/Project\ Sounds_dependency_info.dat -o /Users/admin/Desktop/App\ 2/DerivedData/OEiPhone/Build/Products/Debug-iphonesimulator/Project\ Sounds.app/Project\ Sounds
ld: warning: directory not found for option '-L/Users/admin/Desktop/App 2/Classes/ListControl/OELib'
ld: warning: directory not found for option '-L/Users/admin/Desktop/App 2/../../../iPad/API's/Google Analytics SDK/Library'
ld: warning: directory not found for option '-L/Users/admin/Desktop/App 2/Classes/Analytic'
ld: warning: directory not found for option '-LLibrary'
ld: library not found for -lGoogleAnalytics_NoThumb
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I had the same problem.
Make sure to remove the library in your
Project -> Build Phases -> Link Binary With Libraries
if you removed it or add it if it's missing.
This path
/Users/admin/Desktop/App 2/../../../iPad/API's/Google Analytics SDK/Library
Is pointing at a Library on your desktop. Is that library still there, or did you move/delete it?
When I build an example project in openFrameworks for iOS, it becomes Apple mach-O Linker Error though I do not do anything to the project.
Whichever sample project I choose, it will be the same result.
How do I fix it?
The followings is whole error message.
Ld /Users/xxxxxx/Library/Developer/Xcode/DerivedData/emptyExample-ghwshtlvcvsjalcvfnqzpyjfmhhc/Build/Products/Debug-iphonesimulator/emptyExample.app/emptyExample normal i386
cd /Applications/of_v0.8.4_ios_release/examples/ios/emptyExample
export IPHONEOS_DEPLOYMENT_TARGET=3.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/clang++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -L/Users/xxxxxx/Library/Developer/Xcode/DerivedData/emptyExample-ghwshtlvcvsjalcvfnqzpyjfmhhc/Build/Products/Debug-iphonesimulator -F/Users/xxxxxx/Library/Developer/Xcode/DerivedData/emptyExample-ghwshtlvcvsjalcvfnqzpyjfmhhc/Build/Products/Debug-iphonesimulator -filelist /Users/xxxxxx/Library/Developer/Xcode/DerivedData/emptyExample-ghwshtlvcvsjalcvfnqzpyjfmhhc/Build/Intermediates/emptyExample.build/Debug-iphonesimulator/emptyExample.build/Objects-normal/i386/emptyExample.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC ../../../libs/FreeImage/lib/osx/freeimage.a ../../../libs/freetype/lib/ios/freetype.a ../../../libs/FreeImage/lib/ios/freeimage.a ../../../libs/poco/lib/ios/PocoNet.a ../../../libs/poco/lib/ios/PocoNetSSL.a ../../../libs/poco/lib/ios/PocoCrypto.a ../../../libs/poco/lib/ios/PocoXML.a ../../../libs/poco/lib/ios/PocoZip.a ../../../libs/poco/lib/ios/PocoUtil.a ../../../libs/poco/lib/ios/PocoFoundation.a ../../../libs/tess2/lib/ios/tess2.a ../../../libs/glu/lib/ios/glu.a ../../../libs/glu/lib/ios/glu-ios.a ../../../libs/openssl/lib/ios/ssl.a ../../../libs/openssl/lib/ios/crypto.a -stdlib=libstdc++ -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=3.1 -framework CoreVideo /Applications/of_v0.8.4_ios_release/libs/openFrameworksCompiled/lib/ios/libofxiOS_iphonesimulator_Debug.a -framework Foundation -framework UIKit -framework CoreGraphics -framework OpenGLES -framework QuartzCore -framework AudioToolbox -framework OpenAL -framework CoreLocation -framework CoreGraphics -framework AVFoundation -framework CoreMedia -framework MapKit -Xlinker -dependency_info -Xlinker /Users/xxxxxx/Library/Developer/Xcode/DerivedData/emptyExample-ghwshtlvcvsjalcvfnqzpyjfmhhc/Build/Intermediates/emptyExample.build/Debug-iphonesimulator/emptyExample.build/Objects-normal/i386/emptyExample_dependency_info.dat -o /Users/teruyakusumoto/Library/Developer/Xcode/DerivedData/emptyExample-ghwshtlvcvsjalcvfnqzpyjfmhhc/Build/Products/Debug-iphonesimulator/emptyExample.app/emptyExample
ld: -pie can only be used when targeting iOS 4.2 or later
clang: error: linker command failed with exit code 1 (use -v to see invocation)
As the 2nd to last line in the error message indicates, it looks like you need to set your "Deployment target" to iOS 4.2 or later. It looks you're trying to build for iOS 3.1, but a library is using API's that require 4.2 or newer.
I checked out a working app from SVN. Want to test it in iphone simulator. But the building failed.
Ld /Users/ludwig/Library/Developer/Xcode/DerivedData/MySoftware-eclocsslmbcdgibhlruzhzsnyctb/Build/Products/Debug-iphonesimulator/MySoftware.de.app/MySoftware.de normal i386
cd /Users/ludwig/MySoftware_SVN/MySoftware/trunk/MobileClient/iOS/MySoftware
setenv IPHONEOS_DEPLOYMENT_TARGET 4.3
setenv 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/iPhoneSimulator6.1.sdk -L/Users/ludwig/Library/Developer/Xcode/DerivedData/MySoftware-eclocsslmbcdgibhlruzhzsnyctb/Build/Products/Debug-iphonesimulator -L/Users/ludwig/MySoftware_SVN/MySoftware/trunk/MobileClient/iOS/MySoftware/ZBarSDK -L/Users/ludwig/MySoftware_SVN/MySoftware/trunk/MobileClient/iOS/MySoftware -F/Users/ludwig/Library/Developer/Xcode/DerivedData/MySoftware-eclocsslmbcdgibhlruzhzsnyctb/Build/Products/Debug-iphonesimulator -filelist /Users/ludwig/Library/Developer/Xcode/DerivedData/MySoftware-eclocsslmbcdgibhlruzhzsnyctb/Build/Intermediates/MySoftware.build/Debug-iphonesimulator/MySoftware.build/Objects-normal/i386/MySoftware.de.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=4.3 -framework Security -framework MessageUI -framework AudioToolbox -framework Foundation -framework UIKit -framework CoreGraphics -framework CoreData -framework CoreMedia -framework CoreVideo -framework QuartzCore -liconv -framework AVFoundation -lzbar -o /Users/ludwig/Library/Developer/Xcode/DerivedData/MySoftware-eclocsslmbcdgibhlruzhzsnyctb/Build/Products/Debug-iphonesimulator/MySoftware.de.app/MySoftware.de
ld: library not found for -lzbar
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Can somebody help? Or need more information?!
I am not able to add a screenshot..
in the overview of the "other sources" there is the dict ZBarSDK and inside there is a headers and a resources folder and a file:
libzbar.a but the filename is in Red!? and i am not able to open it. Is this maybe the reason?
There's a particular way to install ZBAR. Follow these instructions : http://zbar.sourceforge.net/iphone/sdkdoc/install.html