• 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: C++ lib link errors on project converted from CodeWarrior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++ lib link errors on project converted from CodeWarrior


  • Subject: Re: C++ lib link errors on project converted from CodeWarrior
  • From: Kurt Bigler <email@hidden>
  • Date: Mon, 29 Aug 2005 19:30:23 -0700

On Aug 27, 2005, at 11:39 PM, Kurt Bigler wrote:

Any help with the link errors below would be appreciated. I seem to be somehow missing C++ basic_string and new/delete functions.

/usr/bin/ld: Undefined symbols:
(anonymous namespace)::basic_string<char, (anonymous namespace)::char_traits<char>, (anonymous namespace)::allocator<char> >::append((anonymous namespace)::basic_string<char, (anonymous namespace)::char_traits<char>, (anonymous namespace)::allocator<char> > const&)
(anonymous namespace)::basic_string<char, (anonymous namespace)::char_traits<char>, (anonymous namespace)::allocator<char> >::basic_string(char const*, (anonymous namespace)::allocator<char> const&)
(anonymous namespace)::basic_string<char, (anonymous namespace)::char_traits<char>, (anonymous namespace)::allocator<char> >::basic_string((anonymous namespace)::basic_string<char, (anonymous namespace)::char_traits<char>, (anonymous namespace)::allocator<char> > const&)
(anonymous namespace)::basic_string<char, (anonymous namespace)::char_traits<char>, (anonymous namespace)::allocator<char> >::~basic_string()
(anonymous namespace)::basic_string<char, (anonymous namespace)::char_traits<char>, (anonymous namespace)::allocator<char> >::~basic_string()
(anonymous namespace)::allocator<char>::allocator()
(anonymous namespace)::allocator<char>::~allocator()
(anonymous namespace)::basic_string<char, (anonymous namespace)::char_traits<char>, (anonymous namespace)::allocator<char> >::c_str() const
(anonymous namespace)::nothrow
operator delete[](void*, (anonymous namespace)::nothrow_t const&)
operator delete(void*, (anonymous namespace)::nothrow_t const&)
operator new[](unsigned long, (anonymous namespace)::nothrow_t const&)
operator new(unsigned long, (anonymous namespace)::nothrow_t const&)
(anonymous namespace)::nothrow
operator new[](unsigned long, (anonymous namespace)::nothrow_t const&)



Note the presence of "(anonymous namespace)" in the link errors above. This didn't surprise me a bit at the time because somewhere in some documentation about differences between CodeWarrior and XCode I had read that the gcc standard C++ library use the global namespace rather than namespace std as used by MSL.


So I conditionally compiled in:

    #define std    /*nothing*/

to alter the std:: qualifiers throughout my code.

And since the information (wherever it was) about namespace std was incorrect, this resulted in all the link errors I experienced. I removed the #define and the link errors are gone.

-Kurt Bigler


_______________________________________________ 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
References: 
 >C++ lib link errors on project converted from CodeWarrior (From: Kurt Bigler <email@hidden>)

  • Prev by Date: Re: Displaying crash log stack trace symbolically
  • Next by Date: Re: Displaying crash log stack trace symbolically
  • Previous by thread: C++ lib link errors on project converted from CodeWarrior
  • Next by thread: Re: C++ lib link errors on project converted from CodeWarrior
  • Index(es):
    • Date
    • Thread