Multiple targets, multiple definitions of symbol
Multiple targets, multiple definitions of symbol
- Subject: Multiple targets, multiple definitions of symbol
- From: Joachim <email@hidden>
- Date: Thu, 5 Jan 2006 02:01:03 -0800
Happy New Year everybody!
I have an Xcode project with two targets. One is included in the
other. They share some code, amongst others a header file with a
bunch of NSDictionary keys defined as NSString pointers. When the
compiler links the last target (that includes the first), I get
"multiple definitions of symbol xyz" for all the NSString* constants.
I've tried:
#ifndef already_def
NSString *aKey = @"The Key Constant";
...
#define already_def
#endif
But obviously that doesn't work because when compiling the individual
target, the #ifndef test renders true. So at link time there are
duplicate symbols.
So my question is, how can I use the same NSString constants in
multiple targets without getting multiple symbol definition errors?
Thanks in advance,
Joachim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden