Re: Xcode Tiger to Leopard duplicate symbols mystery
Re: Xcode Tiger to Leopard duplicate symbols mystery
- Subject: Re: Xcode Tiger to Leopard duplicate symbols mystery
- From: "Kyle Sluder" <email@hidden>
- Date: Wed, 31 Oct 2007 21:37:47 +0000
You really can't do that, for the same reason that you can't #include
"SomeClass.cpp" from SomeOtherClass.cpp. ld will try to link your
object files together and complain when both SomeClass.o and
SomeOtherClass.o declare the same symbol.
Static class variables shouldn't require you to #import the .m file.
Static globals, on the other hand, can be declared "extern" in the
client file, and ld will find the declaration at link time.
--Kyle Sluder
On 10/31/07, Joel Norvell <email@hidden> wrote:
> Dear Xcoders,
>
> I'm muddling through on the problem I reported.
>
> In PDQDocument.m I had been including
>
> #import "PDQAbstractWidget.m"
>
> which I changed to
>
> #import "PDQAbstractWidget.h"
>
> and it builds OK now, but there are execution problems.
>
> I'm still digging and will report back when I remember why I had been including
> the .m file (it had something to do with static class variables) and whether
> the execution problems are related to this and how I was able to get it to
> work. Or possibly ask for help with a more clearly defined problem.
>
> I know many of you are in a critical stage of your own projects right now, and
> I do thank you all for being there.
>
> Yours sincerely,
> Joel Norvell
>
> --- Joel Norvell <email@hidden> wrote:
>
> > Dear Xcoders,
> >
> > I just upgraded to Leopard today (10-31) and am also having the "Xcode Tiger
> to
> > Leopard duplicate symbols mystery" problem with my main project.
> >
> > I'm running on a June 07 MacBook Pro 2.2. I've looked at one of my other
> > projects and it builds OK under Leopard. And I built a couple of the
> examples
> > that come with Leopard successfully.
> >
> > This is a real show-stopper for me. I don't know what to do to fix this.
> > Help will be GREATLY appreciated!
> >
> > I do want to thank Ryan Homer for quantifying and characterizing this
> problem.
> > His depth of knowledge about Xcode is clearly deeper than mine.
> >
> > Sincerely,
> > Joel Norvell
> >
> >
> > Here's what the error says:
> >
> > Line Location Tool:0: Command /Developer/usr/bin/gcc-4.0 failed with exit
> code 1
> >
> > Line Location Tool:0: duplicate symbol .objc_class_name_PDQAbstractWidget in
> >
> /Developer/PDQ/PDQFormBuilder/build/PDQFormBuilder.build/Debug/PDQFormBuilder.build/Objects-normal/i386/PDQAbstractWidget.o
> > and
> >
> /Developer/PDQ/PDQFormBuilder/build/PDQFormBuilder.build/Debug/PDQFormBuilder.build/Objects-normal/i386/PDQDocument.o
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden