c++ - 源码安装了gcc-5.4.0,为什么找不到unordered_map.h等头文件?
伊谢尔伦
伊谢尔伦 2017-04-17 14:53:16
0
3
470

公司的linux服务器是基于redhat修改的,原来安装了gcc-4.4.4,由于对c++11支持不好,因此想升级gcc。由于该机器是同事公用的,所以不想影响其他同时,在自己的目录下用gcc-5.4.0的源码进行安装。安装完成之后gcc-5.4.0下有如下几个目录:

  1. bin       有gcc g++ c++等二进制文件,g++ -v输出版本确实为5.4.0

  2. include     没有任何文件,经查询,发现老版本的gcc在/usr/include/c++/4.4.4/目录下能找到stl头文件

  3. lib       一些库文件

  4. lib64      一些库文件

  5. libexec     一些库文件

  6. share      其他信息

google了半天也都是说什么没加-std=c++11等等,我加上去了也不行。请大神们看看!感谢!

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(3)
大家讲道理

The header file of

c++ is in a folder called c++, search for it~~
However, there is no unordered_map.h file, there is unordered_map, and the header file of c++ is
without extension. If you really want to find unordered_map.h, it may be under the bits folder, but the name is not definitely this. It depends on how the compiler names it

洪涛

Have you used find? You can try locate unordered_map.h

伊谢尔伦

Is it just compiled without executing make install? Those header files should be copied during installation. You can install it in your own directory, but it is best to install it under /usr/local, which will not interfere with the system. And because of this, the gcc installed from the source code has a default search path of /usr/local/include.
Check whether you wrote the correct prefix during configure?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template