• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: multiple definitions of symbol _xxxx
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multiple definitions of symbol _xxxx


  • Subject: Re: multiple definitions of symbol _xxxx
  • From: Steve Christensen <email@hidden>
  • Date: Thu, 8 Feb 2007 23:26:36 -0800

On Feb 8, 2007, at 10:35 PM, Ken Tozier wrote:

I know this is really basic but after 5 years of using #import in Objective C and never having to deal with #include conflicts the following error has me stumped.

I'm seeing a bunch of the following errors in the XCode build window of a loadable Carbon bundle.

multiple definitions of symbol _SOME_SYMBOL_NAME

And this in the build details pane

/usr/bin/ld: multiple definitions of symbol _SOME_SYMBOL_NAME
/<path>/Objects-normal/i386/SourceFile1.o definition of _SOME_SYMBOL_NAME in section (__TEXT,__text)
/<path>/Objects-normal/i386/SourceFile2.o definition of _SOME_SYMBOL_NAME in section (__TEXT,__tex)


"_SOME_SYMBOL_NAME" is in the header file for a 3rd party library I'm using and I have several of my own source files that need to make use of this library. I think there is a circular reference going on but don't remember how to solve it.

I've seen that sort of thing before with an inline function defined in a header that is separately included by several .cpp files. If the inline function doesn't have the "inline" keyword in front, i.e.,


    void foo() { ... }

instead of

    inline void foo() { ... }

then multiple copies are created and then the linker later barfs on it. Could that be what's happening in your case?



_______________________________________________
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


  • Follow-Ups:
    • Re: multiple definitions of symbol _xxxx
      • From: Eric Albert <email@hidden>
References: 
 >multiple definitions of symbol _xxxx (From: Ken Tozier <email@hidden>)

  • Prev by Date: multiple definitions of symbol _xxxx
  • Next by Date: Re: multiple definitions of symbol _xxxx
  • Previous by thread: multiple definitions of symbol _xxxx
  • Next by thread: Re: multiple definitions of symbol _xxxx
  • Index(es):
    • Date
    • Thread