• 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: same function, different mangled names
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: same function, different mangled names


  • Subject: Re: same function, different mangled names
  • From: Eric Albert <email@hidden>
  • Date: Wed, 3 Aug 2005 09:44:37 -0700

On Aug 3, 2005, at 8:32 AM, Stefan Werner wrote:

why do identical C++ symbols get different mangled names? For example:
I build a dynamic library that exports these two symbols:

002f2b68 s __ZN15wxDocChildFrameD0Ev
002f2b28 s __ZN15wxDocChildFrameD1Ev

Those don't appear to be exported. The lowercase 's' means that they're internal. It should be 'S' (or, more typically, 'T', but either is OK).


When I unmangle them with c++filt, all three of them return

wxDocChildFrame::~wxDocChildFrame()

Why are there three different mangled names for the same destructor, and more important: How do I get my program to link correctly? Is something wrong with my build settings? I'm using gcc3.3 in both cases.

GCC may generate multiple destructors for various reasons. I'm afraid I'm not sure why...perhaps one's for deallocating stack-based objects and another's for deallocating objects on the heap? In any case, the compiler does it, and that's why you're seeing multiple symbols. But it looks like none of them are exported, so you'll have to export them.


Hope this helps,
Eric

_______________________________________________
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: same function, different mangled names
      • From: Stefan Werner <email@hidden>
References: 
 >same function, different mangled names (From: Stefan Werner <email@hidden>)

  • Prev by Date: Re: Developer Transition Kit: DVI-VGA adapter cable? Non-Apple monitors?
  • Next by Date: Re: Subclass responsibility error
  • Previous by thread: same function, different mangled names
  • Next by thread: Re: same function, different mangled names
  • Index(es):
    • Date
    • Thread