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

后端 未结 2 1760
一生所求
一生所求 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:09

    On many Linux installations the debug libraries do not contain real code; they only contain the debug info. The two are separated so that you can choose not to install them if you don't need them and you are short of disk space, but the debug libraries are no good on their own.

    GDB is normally preconfigured to find the debug libraries when you need them.

    Of course, your system maybe different. You don't say what it is.

提交回复
热议问题