ios - Duplicate symbols (project using library using same library as project) -


a static library. b static library uses a library. c application uses both a , b libraries.

problem duplicate symbols in c obvious.

what proper (official) solution avoid problem. want use a in b. a, b, c mine projects in 1 xcode workspace.

problem occurs imports ie

#import "a.h" #import "b.h" #import "c.h" 

in interfaces of each other.. better way avoid scenario not import .h file in interface class instead can do

@class a; @class b; @class c; 

in interface, , import respective .h class in .m file.

so should this

in a.h class

@class b; @class c;  @interface : nsobject  @end 

in a.m class

#import "b.h" #import "c.h" @implementation  @end 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -