How to link against debug versions of libc and libstdc++ in GCC?

后端 未结 2 1753
一生所求
一生所求 2020-12-14 18:44

I am aware of this question, but it does not appear to work for me.

For the setup, take a simple C++ program, hw.cpp, given by: int main() { }

2条回答
  •  粉色の甜心
    2020-12-14 19:08

    Your program gets linked to debug libs.

    Only the 'ldd ./hw' is finding the libstdc++ in standard location. For that you need to change LD_LIBRARY_PATH to get the debug shared libraries to load and ldd to find them properly.

提交回复
热议问题