• 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
Linker Warning "direct access"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Linker Warning "direct access"


  • Subject: Linker Warning "direct access"
  • From: Andreas Grosam <email@hidden>
  • Date: Thu, 03 Nov 2011 14:35:51 +0100

I get this linker warning:

ld: warning: direct access in operator<<(std::basic_ostream<char, std::char_traits<char> >&,SemanticActions<UTF_16LE_encoding_tag> const&) to global weak symbol std::fixed(std::ios_base&) means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.


Although I know why it's caused (this occurs in a unit test program where I need to link against a static library and also need to include directly private headers of the static lib in order to test the lower level classes) I would like to know if this might cause any undesired effects. And, if possibly, how this can be fixed.


The above operator is defined in a private header file belonging to the static lib as "friend inline":
template <...>
class SemanticActions {
...
     friend inline
        std::ostream&
        operator<< (std::ostream& os, const SemanticActions& sa)
	{
		os << std::fixed << ...
	}

};

This header includes <iomanip> where the symbol std::fixed(std::ios_base&) is defined. This header is part of the private headers of the static lib and will also be directly included by a unit test, whose application links to the static lib.


Thanks in advance!

Andreas


 _______________________________________________
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: Re: Extremely slow performance editing XIBs
  • Next by Date: Re: Advice on converting this C++ code to Objective-C
  • Previous by thread: Re: Extremely slow performance editing XIBs
  • Next by thread: How To Run Terminal.app from Xcode
  • Index(es):
    • Date
    • Thread