I am trying to integrate Facebook into my app and have already implemented MGTwitterEngine with no issues. I keep getting an error now that I have tried to implement both Facebook sdk and MGTwitterEngine. I have read that there is a duplicate library between both SDK's and the individual said it had to do with the JSON Libraries. I deleted it from the Facebook sdk but I am still getting the error. Does anyone know what the issue may be?
So I understand it is referring to my armv6 in the error but there is no error at all until I try running Facebook sdk
Thanks
Ld "/Users/Alex/Library/Developer/Xcode/DerivedData/grocery-bhrkiajnjqfieahhdxilwtjggbqc/Build/Intermediates/grocery.build/Release-iphoneos/grocery.build/Objects-normal/armv6/grocery" normal armv6
cd /Users/Alex/Documents/Dictator/Lotto
setenv IPHONEOS_DEPLOYMENT_TARGET 3.1
setenv 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 armv6 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -L/Users/Alex/Library/Developer/Xcode/DerivedData/grocery-bhrkiajnjqfieahhdxilwtjggbqc/Build/Products/Release-iphoneos "-L/Users/Alex/Documents/Dictator/Lotto/Classes/Twitter+OAuth 2/SAOAuthTwitterEngine" -F/Users/Alex/Library/Developer/Xcode/DerivedData/grocery-bhrkiajnjqfieahhdxilwtjggbqc/Build/Products/Release-iphoneos -filelist "/Users/Alex/Library/Developer/Xcode/DerivedData/grocery-bhrkiajnjqfieahhdxilwtjggbqc/Build/Intermediates/grocery.build/Release-iphoneos/grocery.build/Objects-normal/armv6/grocery.LinkFileList" -dead_strip -miphoneos-version-min=3.1 -framework Security -lxml2 -framework MessageUI -framework Foundation -framework UIKit -framework CoreGraphics -framework CoreData -framework MapKit -framework SystemConfiguration -lOAuth -o "/Users/Alex/Library/Developer/Xcode/DerivedData/grocery-bhrkiajnjqfieahhdxilwtjggbqc/Build/Intermediates/grocery.build/Release-iphoneos/Lotto Fetcher.build/Objects-normal/armv6/grocery"
ld: duplicate symbol _main in /Users/Alex/Library/Developer/Xcode/DerivedData/grocery-bhrkiajnjqfieahhdxilwtjggbqc/Build/Intermediates/grocery.build/Release-iphoneos/Lotto Fetcher.build/Objects-normal/armv6/main-280587BD193E8878.o and /Users/Alex/Library/Developer/Xcode/DerivedData/grocery-bhrkiajnjqfieahhdxilwtjggbqc/Build/Intermediates/grocery.build/Release-iphoneos/Lotto Fetcher.build/Objects-normal/armv6/main-B9843B6026D6EFA4.o for architecture armv6
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Duplicate symbol
Search your project for two copies of main.m file. :-)
Related
I currently have an app that loads an image from the web like this
[self.userImage setImageWithURL:IMAGEURL placeholderImage:[UIImage imageNamed:#"userPhoto.png"]];
and it works perfectly. I'm still wondering if I can somehow save or cache the image so it shows up quicker when the user opens the app again.
Any help is greatly appreciated.
EDIT:
After importing SDWebImage to my class and upon compiling I get this error
Ld "DerivedData/Social App/Build/Products/Debug-iphonesimulator/Social App.app/Social App" normal i386
cd "/Users/iamgretara/Documents/YouTube app "
setenv IPHONEOS_DEPLOYMENT_TARGET 5.0
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/iamgretara/Documents/YouTube app /DerivedData/Social App/Build/Products/Debug-iphonesimulator" "-L/Users/iamgretara/Documents/YouTube app /GDATA" "-F/Users/iamgretara/Documents/YouTube app /DerivedData/Social App/Build/Products/Debug-iphonesimulator" -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -filelist "/Users/iamgretara/Documents/YouTube app /DerivedData/Social App/Build/Intermediates/Social App.build/Debug-iphonesimulator/Social App.build/Objects-normal/i386/Social App.LinkFileList" -Xlinker -objc_abi_version -Xlinker 2 -ObjC -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=5.0 -framework ImageIO -framework MediaPlayer -framework CoreText -framework AVFoundation -framework SystemConfiguration -framework Security -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -o "/Users/iamgretara/Documents/YouTube app /DerivedData/Social App/Build/Products/Debug-iphonesimulator/Social App.app/Social App"
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_MKAnnotationView", referenced from:
l_OBJC_$_CATEGORY_MKAnnotationView_$_WebCache in MKAnnotationView+WebCache.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Image of error
Sure, you can save the file to disk yourself and check if it exists before you try to load it (all based on URL matching). There are also libraries that will do this kind of stuff for you like SDWebImage / HJCache.
You can try AsyncImageView. It has inbuilt caching support.
try this:
you can try with EGOImageLoading
for image caching support.
i am new to Xcode and obective-c and I have a problem with a project I have taken over from another developer on another machine. I cannot contact this programmer anymore (fired).
Ld /Users/*****/Library/Developer/Xcode/DerivedData/Dino-eyvcyvuofjuafncdadqeywyvdsra/Build/Products/Debug-iphonesimulator/Dino.app/Dino normal i386
cd /Users/******/Dropbox/Xcode/ABCiTY/Dino
setenv IPHONEOS_DEPLOYMENT_TARGET 5.1
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/******/Library/Developer/Xcode/DerivedData/Dino-eyvcyvuofjuafncdadqeywyvdsra/Build/Products/Debug-iphonesimulator -F/Users/******/Library/Developer/Xcode/DerivedData/Dino-eyvcyvuofjuafncdadqeywyvdsra/Build/Products/Debug-iphonesimulator -filelist /Users/******/Library/Developer/Xcode/DerivedData/Dino-eyvcyvuofjuafncdadqeywyvdsra/Build/Intermediates/Dino.build/Debug-iphonesimulator/Dino.build/Objects-normal/i386/Dino.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=5.1 -lABCityCrossMarketing -framework AdSupport -framework CoreMotion -framework SystemConfiguration -framework CoreData -framework QuartzCore -framework CoreImage -framework AVFoundation -framework StoreKit -framework UIKit -framework Foundation -framework CoreGraphics -lGoogleAnalytics -lGoogleConversionTracking -o /Users/*******/Library/Developer/Xcode/DerivedData/Dino-eyvcyvuofjuafncdadqeywyvdsra/Build/Products/Debug-iphonesimulator/Dino.app/Dino
ld: library not found for -lABCityCrossMarketing
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Can anyone help me with this?
You are missing the library file libABCityCrossMarketing.a.
A google for "ABCityCrossMarketing" returns nothing for me. Looks bad. If you still have access to his machine, then that looks like the only way to recover this file (it's possible this library was written by him and never published).
The message is clear here, I think:
library not found for -lABCityCrossMarketing
This happens when you move folders and the controls or basically any file is misplaced by Xcode and it doesn't know where to find it. You'd have to add it to your project again or change the path to it wherever it was listed.
My application is running fine on simulator without any errors. I am using facebook SDK in my application. When i try to run it on device, t\it shows me linker error. I went through some similar questions and tried their solutions like in the following links
tried this solution
and one more solution somewhere , saying unchecking Enable OpenMP Support worked for them but i can not find this option in my xcode4.5.
Ld "/Users/devusa/Library/Developer/Xcode/DerivedData/Virtual_Mirrorr-bsbznuqiwhaypbbjiftsqpwpmkdo/Build/Intermediates/Virtual Mirrorr.build/Debug-iphoneos/Virtual Mirror.build/Objects-normal/armv7s/Virtual Mirror" normal armv7s
cd "/Users/devusa/Documents/Start/Virtual Mirrorr"
setenv IPHONEOS_DEPLOYMENT_TARGET 4.3
setenv 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 armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -L/Users/devusa/Library/Developer/Xcode/DerivedData/Virtual_Mirrorr-bsbznuqiwhaypbbjiftsqpwpmkdo/Build/Products/Debug-iphoneos -F/Users/devusa/Library/Developer/Xcode/DerivedData/Virtual_Mirrorr-bsbznuqiwhaypbbjiftsqpwpmkdo/Build/Products/Debug-iphoneos "-F/Users/devusa/Documents/Start/Virtual Mirrorr" -filelist "/Users/devusa/Library/Developer/Xcode/DerivedData/Virtual_Mirrorr-bsbznuqiwhaypbbjiftsqpwpmkdo/Build/Intermediates/Virtual Mirrorr.build/Debug-iphoneos/Virtual Mirror.build/Objects-normal/armv7s/Virtual Mirror.LinkFileList" -dead_strip -lsqlite3.0 -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=4.3 -framework MessageUI -framework QuartzCore -framework SystemConfiguration -framework UIKit -framework Foundation -framework CoreGraphics -framework FacebookSDK -o "/Users/devusa/Library/Developer/Xcode/DerivedData/Virtual_Mirrorr-bsbznuqiwhaypbbjiftsqpwpmkdo/Build/Intermediates/Virtual Mirrorr.build/Debug-iphoneos/Virtual Mirror.build/Objects-normal/armv7s/Virtual Mirror"
ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/devusa/Documents/Start/Virtual Mirrorr/FacebookSDK.framework/FacebookSDK for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Three options:
Update to a newer version of the Facebook API
Add the armv7s architecture to the build settings of your Facebook framework
Remove the armv7s architecture from the build settings of your app
Basically, armv7s is the architecture used on the iPhone 5 and iPad 4. Your app supports it but the Facebook framework you're using does not.
after adding the OCMock framework i got that strange error... :(
ld: file not found: -fobjc-arc
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It looks like if the compiler flag tries to be loaded by XCode?
Any idea?
Best regards, hijolan
I was getting the exact same error on Xcode 4.3.2. Here's my navigator log; I'm adding it for Google juice.
Ld /Users/makdad/Library/Developer/Xcode/DerivedData/Journal-bfkvfbsrkmrsjpddzfmwrstjfkzr/Build/Products/Debug-iphonesimulator/JournalTests.octest/JournalTests normal i386
cd /Users/makdad/Documents/MT/mt-mobile/iOS/Journal
setenv MACOSX_DEPLOYMENT_TARGET 10.6
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 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/phooze/Library/Developer/Xcode/DerivedData/Journal-bfkvfbsrkmrsjpddzfmwrstjfkzr/Build/Products/Debug-iphonesimulator -F/Users/phooze/Library/Developer/Xcode/DerivedData/Journal-bfkvfbsrkmrsjpddzfmwrstjfkzr/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -filelist /Users/phooze/Library/Developer/Xcode/DerivedData/Journal-bfkvfbsrkmrsjpddzfmwrstjfkzr/Build/Intermediates/Journal.build/Debug-iphonesimulator/JournalTests.build/Objects-normal/i386/JournalTests.LinkFileList -mmacosx-version-min=10.6 -bundle_loader /Users/phooze/Library/Developer/Xcode/DerivedData/Journal-bfkvfbsrkmrsjpddzfmwrstjfkzr/Build/Products/Debug-iphonesimulator/Journal.app/Journal -Xlinker -objc_abi_version -Xlinker 2 -ObjC -force_load -fobjc-arc -ftest-coverage -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=40100 -lOCMock -framework Twitter -framework MapKit -framework MobileCoreServices -framework SystemConfiguration -lxml2 -licucore -framework CoreData -framework CoreGraphics -framework CFNetwork -framework QuartzCore -framework SenTestingKit -framework UIKit -framework Foundation -o /Users/phooze/Library/Developer/Xcode/DerivedData/Journal-bfkvfbsrkmrsjpddzfmwrstjfkzr/Build/Products/Debug-iphonesimulator/JournalTests.octest/JournalTests
The OCMock instructions explicitly ask you to add linker flags -- -ObjC and -force_load.
-force_load is expecting a value -- see the answer to this question that explains that -all_load is what to use if you don't want to specify a library name.
As someone who just spent 25 minutes on this, I should check again with the OCMock tutorial -- I don't think it was very clear in this instruction.
This blog post has a much better image that shows exactly how your settings should look.
I am trying to add TapJoy in my app, after adding the TapJoy class I got this error:
Ld /Users/tamannarahman/Library/Developer/Xcode/DerivedData/Tapjoy-fkglfvxrrgqjzvgmabanjaqvquov/Build/Intermediates/Tapjoy.build/Debug-iphoneos/Tapjoy.build/Objects-normal/armv6/Tapjoy normal armv6
cd /Tamanna/Tapjoy
setenv IPHONEOS_DEPLOYMENT_TARGET 3.0
setenv PATH "/Xcode 4/Platforms/iPhoneOS.platform/Developer/usr/bin:/Xcode 4/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
"/Xcode 4/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2" -arch armv6 -isysroot "/Xcode 4/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk" -L/Users/tamannarahman/Library/Developer/Xcode/DerivedData/Tapjoy-fkglfvxrrgqjzvgmabanjaqvquov/Build/Products/Debug-iphoneos -F/Users/tamannarahman/Library/Developer/Xcode/DerivedData/Tapjoy-fkglfvxrrgqjzvgmabanjaqvquov/Build/Products/Debug-iphoneos -filelist /Users/tamannarahman/Library/Developer/Xcode/DerivedData/Tapjoy-fkglfvxrrgqjzvgmabanjaqvquov/Build/Intermediates/Tapjoy.build/Debug-iphoneos/Tapjoy.build/Objects-normal/armv6/Tapjoy.LinkFileList -dead_strip libxml2 -miphoneos-version-min=3.0 -framework CoreTelephony -framework QuartzCore -framework OpenGLES -framework OpenAL -framework AudioToolbox -framework AVFoundation -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/tamannarahman/Library/Developer/Xcode/DerivedData/Tapjoy-fkglfvxrrgqjzvgmabanjaqvquov/Build/Intermediates/Tapjoy.build/Debug-iphoneos/Tapjoy.build/Objects-normal/armv6/Tapjoy
arm-apple-darwin10-llvm-gcc-4.2: libxml2: No such file or directory
Command /Xcode 4/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1
Can anyone help ?
The relevant part of that log is:
libxml2: No such file or directory
You will want to add the libxml2 library to your project's "Link Binary with Libraries" Build Phase. I believe it's named libxml2.dylib, there may be multiple versions differing in version number.
If the library is already added, remove it and re-add it. It may be linked to the wrong Xcode installation, or the particular version may have been removed or renamed in the latest Xcode.