• 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
C++ specialized template and multiple time defined symbols
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C++ specialized template and multiple time defined symbols


  • Subject: C++ specialized template and multiple time defined symbols
  • From: Jérôme Noël <email@hidden>
  • Date: Thu, 13 Mar 2008 16:23:17 +0100

Hi,

i'm having trouble linking objects using specialized templates. This is with XCode 2.4 and 3, with gcc 4.0.1, on Leopard and Tiger, on an Intel and a G5.
I've been able to create a very simple project that exhibits the problem.


Attachment: test-xcode.zip
Description: Zip archive




In the example, two compilation units include a template header (and don't even use it).
gcc creates a symbol for a specialized template member function for each compilation unit, and fails linking (duplicate symbol). However it behaves correctly for the non specialized version of the template member function (no symbol created).
Commenting the specialized function will lead to a correct link.


Is there something in the syntax that is wrong? a workaround? should i fill a radar bug report?

 Many thanks,

Jerome
 _______________________________________________
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

  • Prev by Date: Weird stuff
  • Next by Date: Re: CFBundleGetFunctionPointerForName
  • Previous by thread: re: Weird stuff
  • Next by thread: xcodebuild load error
  • Index(es):
    • Date
    • Thread