How to use another STL with g ++

I want to use another STL with g ++ instead of the standard libstdC ++. What is the easiest way to do this?

I found the -nostdinC ++ flag that prevents g ++ from looking for its STL headers, but this is just compilation time. He will still make a g ++ link against his own STL.

So I need to find a way to block the binding.

Thanks!

+3
source share
2 answers

One easy way is to build with gcc, not g ++ - it will not reference the C ++ libraries by default, but it will still compile .cpp files as C ++ code. You will need to specify your alternative libraries explicitly on the command line.

+5
source

STLport gcc stl. Ubuntu, , (/usr/lib/libstlport.a). , , .

0

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


All Articles