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.
Related
I just finished programming my application. I tried to archive the App for submission, but it didn't work, the following error was displayed. This problem only happens when I want to archive the app, running on Test device or Simulator works perfect (no errors).
Ld /Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app/MyApp normal armv7
cd /Users/Admin/Desktop/MyApp3
setenv IPHONEOS_DEPLOYMENT_TARGET 6.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 armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -L/Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/BuildProductsPath/Release-iphoneos -L/Users/Admin/Desktop/MyApp3 -F/Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/BuildProductsPath/Release-iphoneos -filelist /Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/MyApp.build/Release-iphoneos/MyApp.build/Objects-normal/armv7/MyApp.LinkFileList -dead_strip -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -force_load /Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/libCordova.a -ObjC -fobjc-link-runtime -miphoneos-version-min=6.1 -lxml2 -lxml2.2 -larchive.2 -framework CoreLocation -framework ImageIO -framework OpenAL -framework AssetsLibrary /Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/BuildProductsPath/Release-iphoneos/libCordova.a -framework Foundation -weak_framework UIKit -framework CoreGraphics -framework AddressBook -framework AddressBookUI -framework AudioToolbox -weak_framework AVFoundation -framework CFNetwork -framework MediaPlayer -framework QuartzCore -framework SystemConfiguration -framework MobileCoreServices -weak_framework CoreMedia -framework CoreLocation -lCordova -o /Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app/MyApp
ld: file not found: /Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/libCordova.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)
(null): File not found: /Users/Admin/Library/Developer/Xcode/DerivedData/Myapp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/Myapp/InstallationBuildProductsLocation/Applications/libCordova.a
(null): Linker command failed with exit code 1 (use -v to see invocation)
I already googled the ** out of this the past days. I tried everything I found. I set Build Active Architecture Only to "YES", deleted search paths (they were already empty), changed iOS Version, set Validate Build Product and other stuff.
I create my projects using terminal and ./create.
I even made a new clean project and posted my source code in there. The problem occures every time (even if I try to archive the new project without changing anything in source)
Using:
XCode 4.6.3
PhoneGap 2.9.0
I am desperate and hope for help. Thank you.
SOLUTION
I found a solution/work-around. (Couldn't post it because if 10Rep. limit, had to wait 8 hours)
In Target's Build Settings, find "Other Linker Flags"
Change $(TARGET_BUILD_DIR)/libCordova.a
To $(BUILT_PRODUCTS_DIR)/libCordova.a
Or just go to the Cordova site and download Cordova 3.0.0
(although the old known "splashscreen - white flash" is back)
With Cordova 3.0 this problem is fixed :)
Archiving works fine.
I am having the same issue... Works fine on simulator and test device, set Build Active Architecture to "YES" on both Cardova and MyApp projects, created using terminal ./create, rebuild the project from scratch.
Using: XCode 4.6.3 PhoneGap 2.9.0
Update:
Rebuilt my project with PhoneGap 3.0.0 and am now able to archive.
For me this was solved by setting "Build Active Architecture Only" to "Yes" for the "Release" setting in your Build Settings in xcode.
The fix described by FlyingLemon had already been done as I have the latest version of PhoneGap.
Phonegap version 3.4.0-0.19.13
Xcode version 5.1
I am getting the following error framework not found -fobjc-arc while compiling an iOS app that previously worked fine. I have no idea what framework it cannot find. Does anyone know where I could track this down? thanks.
Ld /Users/baz/Library/Developer/Xcode/DerivedData/ConverserApp-awrbvmghzyuomheukcqjzijxvnai/Build/Products/Debug-iphoneos/ConverserApp.app/ConverserApp normal armv7
cd /Users/baz/Dropbox/Code/_clients/Converser/ConverserApp
setenv IPHONEOS_DEPLOYMENT_TARGET 6.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 armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -L/Users/baz/Library/Developer/Xcode/DerivedData/ConverserApp-awrbvmghzyuomheukcqjzijxvnai/Build/Products/Debug-iphoneos -L/Users/baz/Dropbox/Code/_clients/Converser/ConverserApp/../mobile-api-docs.2/converser-canary -L/Users/baz/Dropbox/Code/_clients/Converser/ConverserApp/Libs/Converser -F/Users/baz/Library/Developer/Xcode/DerivedData/ConverserApp-awrbvmghzyuomheukcqjzijxvnai/Build/Products/Debug-iphoneos -F/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries -filelist /Users/baz/Library/Developer/Xcode/DerivedData/ConverserApp-awrbvmghzyuomheukcqjzijxvnai/Build/Intermediates/ConverserApp.build/Debug-iphoneos/ConverserApp.build/Objects-normal/armv7/ConverserApp.LinkFileList -dead_strip -ObjC -framework -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=6.1 -framework SystemConfiguration -framework MessageUI -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -lz -framework Reveal -lVGConversationKit_universal -o /Users/baz/Library/Developer/Xcode/DerivedData/ConverserApp-awrbvmghzyuomheukcqjzijxvnai/Build/Products/Debug-iphoneos/ConverserApp.app/ConverserApp
ld: framework not found -fobjc-arc
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Go to Projects--->Targets---->Build Settings--->Other Linker Flags. Click on the value side and make sure there are no extraneous [ -framework ] values. If so, delete them. Notice the pattern of line [-framework], next line has a framework in quotes, next line has [-framework]. Etc. It should never end with a -framework, nor have extras. These linker flags happen after compile and make sure that the binary is linked with necessary frameworks.
It's not a real framework - your command line contains this bit:
-framework -fobjc-arc
Which is wrong - the -framework flag should be followed by a framework name, not by another flag. You need to find out where that extra -framework is coming from. There are several correct -framework flags in that command too - notice that they all have a framework name included: -framework MessageUI -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics
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.
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. :-)
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.