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

Yeah, I’ve gotten this after updating as well. Here’s the solution:

  1. In Xcode, click your target and open Build Settings
  2. 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.

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.

One of my forward slashes was screwed up in the build paths… “iOS\Library/Plugins\IOS”

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.