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 oflibstdc++directly application. make larger binary, not usinglibstdc++.so@ all.
note if link against other shared libraries do link againstlibstdc++.so, binary may not run correctly on target machine, solution should used caution.
Comments
Post a Comment