title: How to Check the Version of my gcc?
body: <pre><code>In file included from /usr/include/c++/4.8.2/locale:41:0,
                   from /usr/include/c++/4.8.2/iomanip:43,
                   from [...omitted by myself as it is irrelevant]
  /usr/include/c++/4.8.2/bits/locale_facets_nonio.h:59:39: error: ‘locale’ has not been declared
       struct __timepunct_cache : public locale::facet
  </code></pre>
  
  <p>Above is the first error in my build log.</p>
  
  <p>I didn't try to compile glibc/gcc myself, and I installed them via yum.</p>
  
  <p>One fishy thing I found is:</p>
  
  <pre><code>$ ll /usr/include/c++/
  total 4
  drwxr-xr-x. 12 root root 4096 Dec 17 14:16 4.8.2
  lrwxrwxrwx   1 root root    5 Dec 17 14:16 4.8.5 -&gt; 4.8.2
  $
  </code></pre>
  
  <p>And yum showed only 1 version of gcc:</p>
  
  <pre><code>$ yum info gcc-c++
  Loaded plugins: fastestmirror, langpacks
  Loading mirror speeds from cached hostfile
   * base: centos.uhost.hk
   * epel: mirrors.hustunique.com
   * extras: centos.uhost.hk
   * updates: centos.uhost.hk
  Installed Packages
  Name        : gcc-c++
  Arch        : x86_64
  Version     : 4.8.5
  Release     : 4.el7
  Size        : 16 M
  Repo        : installed
  From repo   : base
  Summary     : C++ support for GCC
  URL         : http://gcc.gnu.org
  License     : GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
  Description : This package adds C++ support to the GNU Compiler Collection.
              : It includes support for most of the current C++ specification,
              : including templates and exception handling.
  </code></pre>
  
  <p>Any idea how to verify the headers in /usr/include/c++/4.8.2 is indeed from 4.8.5 package?</p>
  
  <p>Thanks in advance.</p>
  
  <p>P.S.  I think probably glibc is irrelevant but here is the info:</p>
  
  <pre><code>$ ldd --version
  ldd (GNU libc) 2.17
  Copyright (C) 2012 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  Written by Roland McGrath and Ulrich Drepper.
  </code></pre>