Re: ld: duplicate symbol

2008-10-01 Thread Claus Atzenbeck
On Tue, 30 Sep 2008, Bill Bumgarner wrote: Solved which problem? Making your code compile or making it work? In this particular case, it would compile and work. However, I see the problem. I declared the variable as extern, as suggested by Nick. This makes more sense. Thanks, also to

ld: duplicate symbol

2008-09-30 Thread Claus Atzenbeck
symbol _CAPersonSwitchKey in [...]/CASocsController.o and [...]/CASocsView.o collect2: ld returned 1 exit status ld: duplicate symbol _CAPersonSwitchKey in [...]/CASocsController.o and [...]/CASocsView.o collect2: ld returned 1 exit status Build failed (1 error

Re: ld: duplicate symbol

2008-09-30 Thread Claus Atzenbeck
On Tue, 30 Sep 2008, Nick Zitzmann wrote: How have you declared CAPersonSwitchKey in the header file? int CAPersonSwitchKey = 0; Making this static solved the problem. Thanks for the pointer. Claus ___ Cocoa-dev mailing list

Re: ld: duplicate symbol

2008-09-30 Thread Nick Zitzmann
On Sep 30, 2008, at 12:21 PM, Claus Atzenbeck wrote: int CAPersonSwitchKey = 0; Making this static solved the problem. Usually the way you do this is to declare it as an extern in the headers, then give it a concrete definition in the source somewhere. Nick Zitzmann

Re: ld: duplicate symbol

2008-09-30 Thread Bill Bumgarner
On Sep 30, 2008, at 11:21 AM, Claus Atzenbeck wrote: On Tue, 30 Sep 2008, Nick Zitzmann wrote: How have you declared CAPersonSwitchKey in the header file? int CAPersonSwitchKey = 0; Making this static solved the problem. Solved which problem? Making your code compile or making it work?