<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div style="margin-top: 0px; margin-bottom: 1em; border: 0px; font-size: 15px; clear: both; color: rgb(34, 34, 34); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 19.5px;" class="">I have a CMake C++ dylib project that builds correctly in one MacOS X environment but fails in another. Environments are on the same machine, but under different users. I'm seeking help how to do I troubleshoot where the failure in the second one comes from.</div><div style="margin-top: 0px; margin-bottom: 1em; border: 0px; font-size: 15px; clear: both; color: rgb(34, 34, 34); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 19.5px;" class="">What I managed to figure out is that in failing configuration CMake adds the following flags in link.txt (the commands used to link the executable)</div><pre style="margin-top: 0px; padding: 5px; border: 0px; font-size: 13px; overflow: auto; width: auto; max-height: 600px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; word-wrap: normal; color: rgb(34, 34, 34); background-color: rgb(238, 238, 238);" class="" id="yui_3_16_0_1_1440339328328_32234"><code style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;" class="">-arch x86_64

-isysroot  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk

-mmacosx-version-min=10.6

-L/usr/local/lib
</code></pre><div style="margin-top: 0px; margin-bottom: 1em; border: 0px; font-size: 15px; clear: both; color: rgb(34, 34, 34); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 19.5px;" class="" id="yui_3_16_0_1_1440339328328_32235">The last one causes havoc as it makes ld pick up dependencies from /usr/local/lib instead of link directories I configured in CMake.</div><div style="margin-top: 0px; margin-bottom: 1em; border: 0px; font-size: 15px; clear: both; color: rgb(34, 34, 34); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 19.5px;" dir="ltr" class="" id="yui_3_16_0_1_1440339328328_32236">I would appreciate any insight what triggers generating the flags above and what is the best way to squelch them, especially -L/usr/local/lib?</div><div></div><div id="yui_3_16_0_1_1440339328328_32198"> </div><div class="signature" id="yui_3_16_0_1_1440339328328_32237">WBR Oleg Zhylin   ovz@yahoo.com</div></div></body></html>