g++ - How can I find wich part of my code is associated with an entry in the symbol table? -


i working on project needs executed in linux machine has turned out not have glibcxx_3.4.20 version of library, code needs it. there anyway find part of code (c++) asks version?

i read elf file using objdump , realdef , found symbol needs it: _zst24__throw_out_of_rang@glibcxx_3.4.20 (4) don't know part of code can related.

your question duplicate of this question.

except in case, it's not libc.so.6, libstdc++.so that's giving trouble.

your problem compiling new gcc, running on machine old libstdc++.so.

you have few options:

  • you can update target machine have new enough libstdc++.so
  • you can build using older version of gcc
  • you use -static-libstdc++ flag link required version of libstdc++ directly application. make larger binary, not using libstdc++.so @ all.

    note if link against other shared libraries do link against libstdc++.so, binary may not run correctly on target machine, solution should used caution.

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -