title: Linux C++ LD_LIBRARY_PATH suppressing standard libraries
body: <p>I'm kind of new to C++ although I have done some Objective C recently so some of it looks vaguely familiar.</p>
  <p>I'm in the process of writing some test programs to gauge whether something is going to be possible or not. In my (very simple 'Hello World') program I'm outputting some text using cout which works fine, however when I modify the <code>LD_LIBRARY_PATH</code> to point to some libraries required by a 3rd party application that I'll be communicating with I get no output but no compiler errors from g++.</p>
  <p>I've tried including the standard paths e.g. <code>/usr/local/lib:/usr/lib:/lib</code> but when I include this in the path I still get no output.</p>
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
      cout &lt;&lt; &quot;Hello World&quot;;
      return 0;
  }
  </code></pre>
  <p>As you can see it a pretty simple program at the moment which works as expected before I set the <code>LD_LIBRARY_PATH</code>.</p>
  <p>I'm not getting any errors at all at any stage so I've no way of knowing whether it's running. Is there anything I can check or any way for me to test whether the program is even running?</p>
  <p>P.S. I've also tried writing output to a file which works before setting the path.</p>
  <p>Many thanks</p>
  <h2>UPDATE</h2>
  <p>Thanks for the replies (see comment below for results)</p>
  <p>Based on what @Nemo said about the 3rd party app having it's own version of libstdc++.so, which was correct, I've swapped out their version of that library with the standard install version. Although I am now getting the 'Hello World' output I am still receiving numerous <code>No such file or directory</code> errors when strace'ing the program so I'm guessing the issue is only partly fixed. I'm not sure if what I've done is 'allowed' or how to proceed from here.</p>