Ubuntu12.04升级C++11标准

传送门:https://blog.csdn.net/u012169524/article/details/51893298

环境:Win10 Microsoft Store 上安装的ubuntu

终端:Win10 Terminal

问题1:
error: this statement may fall through [-Werror=implicit-fallthrough=]
error: right-hand operand of comma expression has no effect [-Werror=unused-value]
error: ‘hexchars’ defined but not used [-Werror=unused-const-variable=
解决:make CFLAGS=’-Wno-implicit-fallthrough -Wno-unused-value -Wno-unused-const-variable’

问题2:
configure: error: no termcap library found
解决:
下载termcap源码安装,下载地址:https://ftp.gnu.org/gnu/termcap/

问题3:
amd64-linux-nat.c:485:1: error: conflicting types for ‘ps_get_thread_area’
linux-x86-low.c:167:1: error: conflicting types for ‘ps_get_thread_area’
还有几处冲突得,使用相同得处理方法
解决:修改文件gdb-7.6.1/gdb/amd64-linux-nat.c gdb-7.6.1/gdb/gdbserver/linux-x86-low.c
,屏蔽ps_get_thread_area定义(不确定是否有影响)