Search code examples
iosobjective-cxcode4xcode5

linker command failed with exit code 1, framework and library errors


I recently received the source code for an app built in 2013 (last year). However, when I try to run it, I receive 3 warnings:

ld: warning: directory not found for option '-L/Users/chesteryeum/iOS/appName/appName_chester'

ld: warning: directory not found for option '-L/Users/chesteryeum/iOS/appName/appName_chester/ZBarSDK'

ld: warning: directory not found for option '-F/Users/chesteryeum/iOS/appName/appName_chester'

And one error

ld: library not found for -lzbar
clang: error: linker command failed with exit code 1 (use -v to see invocation)

A few extra points:

1) chesteryeum is the name of the previous developer, and /Users/chesteryeum is not on my computer, or locatable in finder.

2) Other Linker Flags is empty, Framework Search Paths is empty, Library Search Paths is empty.

3) It seems like the app was built in xCode 4, whereas I am using xCode 5.

Any help would be appreciated,

Thanks in advance,

-Nick

Update: The 3 warnings have been fixed by the answer by Droppy, but the error still remains.


Solution

  • Looks like the library search path is hardcoded to the previous developers locations on their disk. This is obviously bad.

    What you need to do is create a relative directory structure and then set the library/header search paths to use something like $(SRCROOT)/ZBarSDK.