G ++ and libstdC ++

I have the following setup.

The redhat 4 machine with libstdc ++ (old) is installed under / usr / lib and the old version of gcc is set to the default location.

We also have a newer version of gcc 4.4.5 installed in a different directory with a newer version of libstdC ++.

When I create a program with 4.4.5 and try to run, I get errors indicating that I am using an older version of libstdC ++.

Is there a way to make a new compilation a link to the libstdC ++ system installed in / usr / lib instead of the one it comes with.

Thanks in advance

+3
source share
2 answers

(I know this is an old question, this is for other googlers)

, gcc lib. GCC Vx ( + ), alongst ( --prefix . /configure ), .

++ lib gcc gcc .

, / lib , , .

+2

, libstd++? , , , . LD_LIBRARY_PATH.

export LD_LIBRARY_PATH="/path/to/my/new/lib:${LD_LIBRARY_PATH}"
+1
source

Source: https://habr.com/ru/post/1784562/


All Articles