View
Case Study
View
more
Request a quote
example
Back to Blog
22 April 2011

XCode 4 Bug – Duplicating a Target Results in Link Error Due to Missing Paths

XCode

This should be titled, “oh XCode 4 why do you spite me so?”. What have I done to deserve being smote by XCode? I ran into an couple issues with the latest version of XCode 4 when I tried to duplicate an existing target that was linked against a bunch of 3rd party libraries. One of the annoying things I ran into is that the new target was autonamed “[projectname] copy”. You could rename the target, however internally it was still referred to as “[projectname] copy”. You could not change the project id in the target settings and you had to live with this. That’s a minor annoyance, what was worse was all my string paths referring to my library search paths got escaped so that the build would fail during the linking phase. So if you have this mystery problem, then go into you Target Build Settings > Library Search Path, then double-click on the path. Notice all your quotes have been escaped with a backslash. Delete those puppies and you’ll be good-to-go.

Here’s another good explanation:

http://web.archive.org/web/20111208225223/http://www.executionunit.com:80/2011/03/25/xcode-4-duplicating-a-target-to-make-an-ipad-build-link-error/

Be careful out there! XCode doesn’t hate us, it just likes our attention and gets jealous when we don’t spend enough time tinkering with it…