Here's one possible cause of this (there's probably others):
Make sure the Identity and Type inspector is showing and select the libWhatever.a file in your application's project (not the library). If you see Location: Relative to Project, this is your problem.
- Click Relative to Project and change it to Relative to Build Products.
- This will change the type of the link, but it will still be broken.
- Click the locate button and find the output file.
Honestly, you're probably better off editing the pbxproj directly. Your patch will look something like this:
Index: App.xcodeproj/project.pbxproj
===================================================================
--- App.xcodeproj/project.pbxproj (revision 28061)
+++ App.xcodeproj/project.pbxproj (working copy)
@@ -28,7 +28,7 @@
/* Begin PBXFileReference section */
A7052F8F1358BFCC00178DAC /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; };
- A74F787413566130000D0AFC /* libLibrary.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libLibrary.a; sourceTree = SOURCE_ROOT; };
+ A74F787413566130000D0AFC /* libLibrary.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libLibrary.a; sourceTree = BUILT_PRODUCTS_DIR; };
A74F787D135665A3000D0AFC /* Macros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Macros.h; path = DslExt/Macros.h; sourceTree = "<group>"; };
A74F787E135665A3000D0AFC /* Foundation-dsl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "Foundation-dsl.m"; path = "DslExt/Foundation-dsl.m"; sourceTree = "<group>"; };
A74F787F135665A3000D0AFC /* Foundation-dsl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Foundation-dsl.h"; path = "DslExt/Foundation-dsl.h"; sourceTree = "<group>"; };
I found this answer here:
What's the correct way to configure XCode 4 workspaces to build dependencies when needed?