Lekshmi,
On Thu, Jun 18, 2020 at 11:38:02PM +0200, Rajalekshmi Deepu wrote:
Dear Itaru,
You meant to check the GLIBCXX versions?
If yes, you could try the below sample command:
$ strings /lib64/libstdc++.so.6 | grep GLIBCXX [...]
"objdump -p /lib64/libstdc++.so.6" will also print the GCC C++ APIs supported by your libstdc++ - if you want to parse that further automatically, piping it through awk seems to do the job:
objdump -p /usr/lib64/libstdc++.so.6 | awk '/^[0-9]/{print $NF}'
Technically "strings" can return false positives due to other string matches - even if, speaking practically, this is rather unlikely to happen.
It seems I misunderstood Kitayama-san's question, to me ...
On 17.06.20 11:54, Itaru Kitayama wrote:
Lekshmi,
Is there a way to determine it by using a command?
... sounded like how to list all versions of GCC that are installed/available. "gcc -v" together with listing the available environment modules ("module list") might be helpful there, but that won't find GCC versions installed in your home directory (or similar) or modules that only become available once you load other modules. "module spider" has failed me so often in the past that at least *to me* it doesn't seem worth suggesting that.
cheers, Harold