title: Strange warnings from the linker (ld)
body: <p>We are building a Mac OSX application which is written mostly in Obj-C/Cocoa.
  The application then statically links with some 3rd party libraries, written in C/C++ and compiled by us (on a command line, using either MacPorts or the usual "./configure &amp;&amp; make"; all are universal binaries).</p>
  
  <p>The application is working perfectly, but ad compile time we are always getting these strange linker warnings:</p>
  
  <pre><code>ld: warning: direct access in ___cxx_global_var_init17 to global weak symbol __ZGVN4i18n12phonenumbers9SingletonINS0_15PhoneNumberUtilEE8instanceE means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
  ld: warning: direct access in ___cxx_global_var_init17 to global weak symbol __ZGVN4i18n12phonenumbers9SingletonINS0_15PhoneNumberUtilEE8instanceE means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
  ld: warning: direct access in ___cxx_global_var_init17 to global weak symbol __ZN5boost10scoped_ptrIN4i18n12phonenumbers15PhoneNumberUtilEED1Ev means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
  ld: warning: direct access in ___cxx_global_var_init17 to global weak symbol __ZN4i18n12phonenumbers9SingletonINS0_15PhoneNumberUtilEE8instanceE means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
  ld: warning: direct access in ___cxx_global_var_init17 to global weak symbol __ZGVN4i18n12phonenumbers9SingletonINS0_15PhoneNumberUtilEE8instanceE means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
  </code></pre>
  
  <p>This comes from a C/C++ library. We are linking with these libs:</p>
  
  <ol>
  <li><a href="http://code.google.com/p/libphonenumber/" rel="noreferrer">libphonenumber</a>, which is the one causing 4 of the 5 warnings, apparently. Compiled by us via "cmake".</li>
  <li>boost (libboost_thread-mt), responsible of 1 warning. Compiled with MacPorts.</li>
  <li>ICU (libicudata, libicuuc, libicui18n), compiled with MacPorts.</li>
  <li><a href="http://code.google.com/p/protobuf/" rel="noreferrer">Protocol Buffers</a>, compiled via "./configure &amp;&amp; make".</li>
  </ol>
  
  <p>Please note:</p>
  
  <ol>
  <li>The application is working perfectly despite the warnings, but we'd like to get rid of them as they are annoying.</li>
  <li>The solution proposed by <a href="https://stackoverflow.com/questions/8685045/xcode-with-boost-linkerid-warning-about-visibility-settings">xcode with boost : linker(Id) Warning about visibility settings</a> doesn't work: "Symbols hidden by default" has always been "YES".</li>
  </ol>