I have a project that has multiple targets. And a embedded project whose output is a framework.
One of those targets requires just a couple of files {.h,.m} of that framework, so.. I just reference them. Now, when I build that specific target I get this error:
In file included from /Users/../someClass.m:10: Foo.h:11:1: error:
duplicate interface definition for class 'Foo'
@interface Foo : NSObject {
^
/Users/....MyProject/DerivedData/MyProject/Build/Products/Debug/MyFramework.framework/Headers/Foo.h:11:12:note: previous definition is here
@interface Foo : NSObject {
^
What I see is: Xcode finds two copies of Foo class, one is the referenced one and the other is the contained in MyFramework. (both copies are the same file).
The thing is, this target is not building, linking or doing anything with MyFramework. (aka. for my target: 0 target dependencies, Foo.m is included in 'compile sources' and MyFramework is not listed in 'link binary with libraries').
Questions: 1. How may I build my target without linking MyFramework?
Thanks!
FYI.
I'm using Xcode 4.6.3
The Framework is a mixture between C, C++ and ObjC. - compiled as ObjC++ and ARC enabled.
The target I'm having problems to build is C and ObjC without ARC.