Framwork in NSBundle

  • hello,

    I have a problem with a framework, loaded in a plugin. The framework
    does work in the main app. I get, amongst others, this errors:

    ...fer.framework/Headers/GSGlyph.h:14: warning: duplicate interface
    declaration for class 'GSClass1'
    ...fer.framework/Headers/GSGlyph.h:22: error: redefinition of 'struct
    GSClass1'

    the GSClass1.h starts with:

    #import <Cocoa/Cocoa.h>
    @class GSClass2;
    @class GSClass3;
    @class GSClass4;

    @interface GSClass1 : NSObject <NSCoding> {
    NSMutableArray * masters;
    NSString * name;
    GSClass4 * parent;
    NSImage * icon;
    ...
    }
    @property(retain) GSClass4 * parent;
    @property(retain) NSImage * icon;
    ...

    the other classes look similar.

    I made the framework like this:
    http://rentzsch.com/cocoa/embeddedFrameworks

    can anyone explain me what I did wrong.
    Thanks
    Georg
  • And what about GSGlyph.h? From the warning & error it seems
    something's going wrong there. Did you use #import to get the
    GSClass1 header?

    Christiaan

    On 20 Jan 2008, at 6:13 PM, Georg Seifert wrote:

    > hello,
    >
    > I have a problem with a framework, loaded in a plugin. The
    > framework does work in the main app. I get, amongst others, this
    > errors:
    >
    > ...fer.framework/Headers/GSGlyph.h:14: warning: duplicate interface
    > declaration for class 'GSClass1'
    > ...fer.framework/Headers/GSGlyph.h:22: error: redefinition of
    > 'struct GSClass1'
    >
    > the GSClass1.h starts with:
    >
    > #import <Cocoa/Cocoa.h>
    > @class GSClass2;
    > @class GSClass3;
    > @class GSClass4;
    >
    > @interface GSClass1 : NSObject <NSCoding> {
    > NSMutableArray * masters;
    > NSString * name;
    > GSClass4 * parent;
    > NSImage * icon;
    > ...
    > }
    > @property(retain) GSClass4 * parent;
    > @property(retain) NSImage * icon;
    > ...
    >
    > the other classes look similar.
    >
    > I made the framework like this:
    > http://rentzsch.com/cocoa/embeddedFrameworks
    >
    >
    > can anyone explain me what I did wrong.
    > Thanks
    > Georg
    >
    > _______________________________________________
    > MacOSX-dev mailing list
    > <MacOSX-dev...>
    > http://www.omnigroup.com/mailman/listinfo/macosx-dev
previous month january 2008 next month
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today