- Home /
Error when I updated to xcode 5 to get import to ios 7.
Hi, it's a first time that I seen this. "linker command failed with exit code 1 (use -v to see invocation)", I'd like to know how can I solve this error, because someone maybe happens before to me.
**ld: warning: directory not found for option '-L"/Users/me/Projects/myapp/Builds/dev/Libraries"'**
ld: library not found for -liPhone-lib
**clang: error: linker command failed with exit code 1 (use -v to see invocation)**
Ld /Users/me/Library/Developer/Xcode/DerivedData/Unity-iPhone-cvvkaydfohajmgdagqjznzyqunxp/Build/Products/myapp.app/myapp normal armv7
cd /Users/me/Projects/myapp/Builds/SSS_dev
setenv IPHONEOS_DEPLOYMENT_TARGET 6.0
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/iPhoneOS7.0.sdk
-L/Users/me/Library/Developer/Xcode/DerivedData/Unity-iPhone-cvvkaydfohajmgdagqjznzyqunxp/Build/
-filelist
/Users/me/Library/Developer/Xcode/DerivedData/Unity-iPhone-cvvkaydfohajmgdagqjznzyqunxp/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/myapp.LinkFileList -dead_strip -weak_framework CoreMotion -weak-lSystem -ObjC -all_load -stdlib=libstdc++ -fobjc-link-runtime -miphoneos-version-min=6.0
/Users/olgacardenas/Projects/myapp/Unity3D/Game/Assets/Plugins/iOS/metaiosdk
-lxml2.2
-framework Foundation
-framework UIKit
-framework OpenGLES
-framework QuartzCore
-framework OpenAL
-liconv.2
-liPhone-lib
-framework AudioToolbox
-framework CFNetwork
-framework MediaPlayer
-framework CoreLocation
-framework SystemConfiguration
-weak_framework iAd
-framework CoreMedia
-framework CoreVideo
-weak_framework AVFoundation
-framework CoreGraphics
-weak_framework CoreMotion
-weak_framework GameKit
-weak_framework AdSupport
-weak_framework AssetsLibrary
-weak_framework CoreImage
-weak_framework MessageUI
-weak_framework Security
-weak_framework Social
-weak_framework StoreKit
-weak_framework Twitter
-framework Everyplay
-lChartboost
-lz.1.1.3
-lGameCenterPlugin
-lP31MonoBridge
-framework CoreTelephony
-framework MobileCoreServices
-framework MobileAppTracker
-lP31SharedTools
-weak_framework Accounts
-lfacebook_ios_sdk
-lP31Twitter
-lsqlite3.0
-lStoreKit
-Xlinker
-dependency_info
-Xlinker
Answer by mattssonon · Sep 17, 2013 at 09:07 AM
Yeah, I've gotten this after updating as well. Here's the solution:
In Xcode, click your target and open Build Settings
Find Library Search Paths and remove all the escaped double quotes, e.g. from
\"$(SRCROOT)/Libraries\"
you remove\"
so it becomes$(SRCROOT)/Libraries
Hopefully this will be fixed at some point, but this is the fix I've found for now.
EDIT: Thanks to Nico de Poel below, there is a much faster way to fix this, I have updated the guide above to show his solution.
Hi $$anonymous$$att
I think have the same problem. I got the "Apple o-$$anonymous$$arch error" and said missing liPhone-lib. Can you explain the 3 & 4 steps a bit clearer for me? I don't get how to Remove Reference and the Re-add bit. Also I can't find the "Add Files" when i right click on the libraries folder. Your help will very appreciate.
Jas
Hi Jason, sure.
Right-click libiPhone-lib.a in Libraries and click Delete
Click Remove Reference in the pop-up
Right-click the Libraries folder in Xcode and click Add Files to ... (C$$anonymous$$D + Option + A)
Select the libiPhone-lib.a file and add it
This should create a working path to Libraries in Library Search Paths and make the Linker error go away.
Hi $$anonymous$$att,
Thanks! The Linker error did go away, but sadly another error pop up... I guess I'll try rebuild the project
Yes.. I delete the whole build folder and all the folders in library/xcode/developer/deriveddata. Then rebuild the project. It works!
Answer by Nico de Poel · Oct 18, 2013 at 03:43 PM
Looks like either Unity or Xcode incorrectly puts double quotes around the search path for the Libraries folder.
In the project's Library Search Paths, find the entry that looks like this:
\"$(SRCROOT)/Libraries\"
double click the entry to edit it and remove the escaped double quotes, so it looks like this:
$(SRCROOT)/Libraries
The project should now compile correctly again.
Answer by moosecanoes · Jun 17, 2015 at 03:21 AM
One of my forward slashes was screwed up in the build paths.... "iOS\Library/Plugins\IOS"
Answer by cherrypick-games · Jan 14, 2016 at 07:37 PM
Changing build paths didn't help me, but what (probably) did was moving the project to directory which did not have space in name (my projects directory name was 'Unity Projects'). So make sure you remove all the spaces in the path to libraries.