On Mon, Sep 21, 2009 at 1:19 PM, Frederick C. Lee <amourinet...@gmail.com> wrote: > I place this at the top of the .h (or .m) file, outside of any class or > method as stand alone. > > However, every time I try to use the (2) declaration (within a .h file) the > linker gives the error: 'duplicate symbol _x in ....'
Think about it: every time the preprocessor transcludes your header file into a translation unit, it's going to emit another symbol declaration. The linker is going to try to combine all your compiled object files, each one declaring its own "x". You might want to review your favorite C documentation. I always preferred K&R. --Kyle Sluder _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com