user1423012
user1423012

Reputation: 61

Linker command failed with exit code1 in iOS while using static library file

I create a static library file and used this in another project and build it then I got the error message as bellow.

Undefined symbols for architecture i386: "_OBJC_CLASS_$_Test_For_Static", referenced from: objc-class-ref in AppDelegate.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Please give suggestions to resolve this error.I create a static library by following this link http://www.icodeblog.com/2011/04/07/creating-static-libraries-for-ios/

Upvotes: 0

Views: 690

Answers (2)

trojanfoe
trojanfoe

Reputation: 122401

Add both projects into an Xcode workspace and simply make the static library a dependency of the other project. You will need to configure header search paths and then Xcode should take care of the rest automatically.

Upvotes: 0

user1423012
user1423012

Reputation: 61

To resolve this problem we need to configure the application target to build the static library target and we need to configure the application target to link to the static library target.

Upvotes: 0

Related Questions