Note that there are some explanatory texts on larger screens.

plurals
  1. POGCC Not linking correct libraries
    text
    copied!<p>I have two versions of GCC installed on my system 4.6.2 and 4.7.0. I am running Fedora Core 16.</p> <p>4.6.2 is installed in <code>/usr/bin</code> and 4.7.0 is installed in <code>/home/nerozehl/local/bin</code>. The libraries and runtime for C++ are also compiled and installed in <code>/home/nerozehl/local/lib</code> and <code>/home/nerozehl/local/lib64</code>.</p> <p>I also have two versions of Boost installed, with libraries in <code>/usr/lib64</code> and <code>/home/nerozehl/local/lib</code>. (Boost 1.47.0 and 1.49.0, respectively)</p> <p>The problem I am having is that g++ / ld are linking against the default libraries, and not the newer ones in <code>/home/nerozehl/local</code>. I am using <code>configure</code> to generate Makefiles, and am calling it this way:</p> <pre><code>CXX=g++47 CXXFLAGS="-g -O0 -pg" LDFLAGS="-L/home/nerozehl/local/lib" ./configure --prefix=/home/nerozehl/local </code></pre> <p>Where <code>g++47</code> resides in the <code>/home/nerozehl/local/bin</code> (in my <code>$PATH</code>).</p> <p>When I compile, everything is fine, and the newer headers are used, but when I check what it was linked against:</p> <pre><code>ldd source/noes linux-vdso.so.1 =&gt; (0x00007fffebfff000) libboost_filesystem-mt.so.1.47.0 =&gt; /usr/lib64/libboost_filesystem-mt.so.1.47.0 (0x0000003c6a800000) libboost_system-mt.so.1.47.0 =&gt; /usr/lib64/libboost_system-mt.so.1.47.0 (0x0000003c6a400000) libboost_program_options-mt.so.1.47.0 =&gt; /usr/lib64/libboost_program_options-mt.so.1.47.0 (0x0000003c6ac00000) libstdc++.so.6 =&gt; /usr/lib64/libstdc++.so.6 (0x0000003c6dc00000) libm.so.6 =&gt; /lib64/libm.so.6 (0x0000003c68c00000) libgcc_s.so.1 =&gt; /lib64/libgcc_s.so.1 (0x0000003c69c00000) libc.so.6 =&gt; /lib64/libc.so.6 (0x0000003c68800000) libpthread.so.0 =&gt; /lib64/libpthread.so.0 (0x0000003c69000000) librt.so.1 =&gt; /lib64/librt.so.1 (0x0000003c69800000) /lib64/ld-linux-x86-64.so.2 (0x0000003c68400000) </code></pre> <p>For the life of me I can't figure out how to force g++ / ld / configure to use my newer libraries. Any help would be appreciated.</p>
 

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