I have implemented two static library having the following structure:
FirstStaticLibrary.a
BaseClass.h
@interface BaseClass
-some methods
@end
FirstDerivedClass.h
@interface FirstDerivcedClass:BaseClass
{
}
-some methods
@end
SecondStaticLibrary.a
BaseClass.h
@interface BaseClass
-some methods;
@end
SecondDerivedClass.h
@interface SecondDerivedClass:BaseClass
{
}
-someMethods;
@end
Above two static library is having the common file BaseClass.h and BaseClass.m
These static libraries are added into TestApplication Project.
But while running the application, it's throwing an error:
Duplicate symbols found in /User/Library/Developer/Xcode/..E./FirstStaticLibrary.a (BaseClass.o) and /User/Library/Developer/Xcode/..E./SecondStaticLibrary.a (BaseClass.o) for architecture i386
Please suggest a way to remove this error.
This answer is probably one you will want to hear! I managed to find a solution that works! Hopefully others will learn that even when they include other APIs into their frameworks, they still always need to place their prefix on the classes. Look here.
The answer is one you probably don't want to hear, but you will have to change the name in one of your libraries. Assuming you have access to both libraries that is.