Tag: mach o

Mach-o Linker Error

I can’t build my project because I keep getting this error. As I understood it deals with the constant tagShift I’m using in my code. I would appreciate if anyone could help me to solve this issue

Wrong method implementation address from otool for armv7?

I’m constantly getting 1 byte offset for implementation address of method shown by ‘otool‘. For an example ‘otool -o’ gives 0xe99d5 but ‘otool -tvV’ gives: +[NSError(SomeCategory) someMethod]: 000e99d4 b590 push {r4, r7, lr} 000e99d6 f6441184 movw r1, 0x4984 000e99da af01 add r7, sp, #4 000e99dc f2c0010a movt r1, 0xa So method starts at 0xe99d4. 0xe99d5 […]

Xcode error “Duplicate Symbol” causing Apple Mach-O Linker Error

duplicate symbol _leagueTableLoaded in: /Users/Brendan/Library/Developer/Xcode/DerivedData/2013-dbhrwzgxgwhfbqatgqpfrmqyucyu/Build/Intermediates/2013.build/Debug-iphonesimulator/2013.build/Objects-normal/i386/LTGlobalResultsViewController.o /Users/Brendan/Library/Developer/Xcode/DerivedData/2013-dbhrwzgxgwhfbqatgqpfrmqyucyu/Build/Intermediates/2013.build/Debug-iphonesimulator/2013.build/Objects-normal/i386/LTJumpToMeViewController.o duplicate symbol _showGLobalCompany in: /Users/Brendan/Library/Developer/Xcode/DerivedData/2013-dbhrwzgxgwhfbqatgqpfrmqyucyu/Build/Intermediates/2013.build/Debug-iphonesimulator/2013.build/Objects-normal/i386/LTGlobalResultsViewController.o /Users/Brendan/Library/Developer/Xcode/DerivedData/2013-dbhrwzgxgwhfbqatgqpfrmqyucyu/Build/Intermediates/2013.build/Debug-iphonesimulator/2013.build/Objects-normal/i386/LTJumpToPositionViewController.o duplicate symbol _leagueTableLoaded in: /Users/Brendan/Library/Developer/Xcode/DerivedData/2013-dbhrwzgxgwhfbqatgqpfrmqyucyu/Build/Intermediates/2013.build/Debug-iphonesimulator/2013.build/Objects-normal/i386/LTGlobalResultsViewController.o /Users/Brendan/Library/Developer/Xcode/DerivedData/2013-dbhrwzgxgwhfbqatgqpfrmqyucyu/Build/Intermediates/2013.build/Debug-iphonesimulator/2013.build/Objects-normal/i386/LTJumpToPositionViewController.o ld: 3 duplicate symbols for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) I am getting the error above in xcode only when I try to build in simulator […]

Need help: 'Wrong Architecture' causing app to crash when launching in iOS 7 but works fine in iOS 8

My app crashes when I launch it in iOS 7.1 but works fine in iOS 8.1 The error I get is this: dyld: Library not loaded: /System/Library/Frameworks/AVKit.framework/AVKit Referenced from: MY APP Reason: no suitable image found. Did find: /System/Library/Frameworks/AVKit.framework/AVKit: mach-o, but wrong architecture (lldb) I also noticed a similar error but with the UIKit mentioned […]

duplicate symbols for architecture arm64 (Xcode error)

I deleted all reference to GoogleMobileAdsSDKiOS-7.1 from my project and added 7.4.1. When I ran app on simulator everything works fine but when running on device I get App Mach-O Linker Error. duplicate symbol l017 in: /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS- 7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADAdNetworkJavaScriptAdViewDelegate.o) /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADRewardBasedVideoAd+Mediation.o) duplicate symbol l018 in: /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADMRAIDPicture.o) /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADRewardBasedVideoAd+Mediation.o) duplicate symbol l016 in: /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADBannerAdViewDelegate.o) […]

How do I create a dynamic library (dylib) with Xcode?

I’m building few command-line utilities in Xcode (plain C, no Cocoa). I want all of them to use my customized version of libpng, and I want to save space by sharing one copy of the library among all executables (I don’t mind re-distributing .dylib with them). Do I need to do some magic to get […]

APPLE MACH-O LINKED ERROR After adding AFNetworking

Just adding AFNetworking into my project, and after B&R here i got this error like: Undefined symbols for architecture i386: “_SecCertificateCopyData”, referenced from: -[AFURLConnectionOperation connection:willSendRequestForAuthenticationChallenge:] in AFURLConnectionOperation.o “_SecCertificateCreateWithData”, referenced from: ___44+[AFURLConnectionOperation pinnedPublicKeys]_block_invoke in AFURLConnectionOperation.o “_SecPolicyCreateBasicX509”, referenced from: ___44+[AFURLConnectionOperation pinnedPublicKeys]_block_invoke in AFURLConnectionOperation.o -[AFURLConnectionOperation connection:willSendRequestForAuthenticationChallenge:] in AFURLConnectionOperation.o “_SecTrustCopyPublicKey”, referenced from: ___44+[AFURLConnectionOperation pinnedPublicKeys]_block_invoke in AFURLConnectionOperation.o -[AFURLConnectionOperation connection:willSendRequestForAuthenticationChallenge:] in […]

Mach-O symbol stubs (IOS)

I am trying to understand how Mach-o files work, and have made a good deal of progress with the online resources available (In particular, the Apple page here: http://developer.apple.com/library/mac/#documentation/developertools/conceptual/MachORuntime/Reference/reference.html), but I have hit a roadblock on understanding how symbol stubs work. Using “otool -l” I see the following section: Section sectname __symbolstub1 segname __TEXT addr […]

How to insert a LC_LOAD_DYLIB command into a Mach-O binary or join a static library to an existing binary (IOS)

This is the first time I am asking on stackoverflow and I am desperate. My task is to load a dylib or join a static lib to an already existing executable for an IOS device. I will be using the static void __attribute__((constructor)) initialize(void) to start the swizzling. This executable is for in house enterprise […]

Xcode gives Apple Mach-O linker error

I just compiled a project and Xcode returns these two errors which don’t seem to be my code’s fault. How do I fix them? Undefined symbols for architecture i386: “_vImageBoxConvolve_ARGB8888”, referenced from: -[UIImage(Blur) boxblurImageWithBlur:] in UIImage+Blur.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to […]