Note that there are some explanatory texts on larger screens.

plurals
  1. POStrange warnings from the linker (ld)
    primarykey
    data
    text
    <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="nofollow 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="nofollow 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>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload