vi /etc/profile# 在打开的文件末尾加上export CPLUS_INCLUDE_PATH=/usr/local/gcc-11.2.0/include/c++/11.2.0:/usr/local/gcc-11.2.0/include/c++/11.2.0/x86_64-pc-linux-gnu/
# 此时# [root@dxyt build]# pwd# /root/App/gdb/gdb-11.1/build# -------------------------------make && make install
如果编译出错, 可以复制错误去搜索一下哪里出错, 一般可能是依赖库的问题, 安装一下就好了
如果是跟着本篇文章安装的, 应该是不会出现gcc版本错误的
安装成功之后, 还是需要添加软连接的
SHELL
1
ln -s /usr/local/gdb11.1/bin/gdb /usr/bin/gdb
创建软连接之后, 就可以使用gdb了:
SHELL
1
2
3
4
5
6
[root@dxyt ~]# gdb -vGNU gdb (GDB) 11.1Copyright (C) 2021 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software: you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law.
call plug#begin('~/.config/nvim/plugged')Plug 'neoclide/coc.nvim', {'branch': 'master'}Plug 'mg979/vim-xtabline'Plug 'liuchengxu/vista.vim'Plug 'bling/vim-airline'Plug 'majutsushi/tagbar'"Plug 'itchyny/lightline.vim'Plug 'ajmwagar/vim-deus'Plug 'vim-airline/vim-airline-themes'Plug 'jiangmiao/auto-pairs'Plug 'octol/vim-cpp-enhanced-highlight' " C++ 高亮call plug#end()" 这几个是挑选的还不错的几个 airline 主题" let g:airline_theme="ravenpower"" let g:airline_theme="minimalist"" let g:airline_theme="kolor"" let g:airline_theme="jellybeans"" let g:airline_theme="distinguished"" let g:airline_theme="behelit"" let g:airline_theme="tomorrow"let g:airline_theme="biogoo"" let g:airline_theme="deus"set noshowmodeset relativenumber " 相对行号set helplang=cnset ambiwidth=double " =============== airline =================let g:airline_powerline_fonts = 1let g:airline#extensions#tabline#enabled = 0let g:airline#extensions#tabline#buffer_nr_show = 1" 关闭状态显示空白符号计数let g:airline#extensions#whitespace#enabled = 0let g:airline#extensions#whitespace#symbol = '!'" unicode symbolslet g:airline_left_sep = '»'let g:airline_left_sep = '▶'let g:airline_right_sep = '«'let g:airline_right_sep = '◀'" powerline symbolslet g:airline_left_sep = ''let g:airline_left_alt_sep = ''let g:airline_right_sep = ''let g:airline_right_alt_sep = ''" old vim-powerline symbolslet g:airline_left_sep = ''let g:airline_left_alt_sep = ''let g:airline_right_sep = ''let g:airline_right_alt_sep = ''nmap <C-z> <Cmd>:bn<CR>" 设置UTF-8编码set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936set termencoding=utf-8set encoding=utf-8" 设置行数显示set numberset t_ut= " 防止vim背景颜色错误set softtabstop=4set t_Co=256set tabstop=4 "tab长度set shiftwidth=4 " 缩进长度"==========================================="coc.nvim 配置"==========================================="" TAB选择 " Use tab for trigger completion with characters ahead and navigate" NOTE: There's always complete item selected by default, you may want to enable" no select by `"suggest.noselect": true` in your configuration file" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by" other plugin before putting this into your configinoremap <silent><expr> <TAB> \ coc#pum#visible() ? coc#pum#next(1) : \ CheckBackspace() ? "\<Tab>" : \ coc#refresh()inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"function! CheckBackspace() abort let col = col('.') - 1 return !col || getline('.')[col - 1] =~# '\s'endfunction" coc加载set updatetime=100" coc-translator" ==================== xtabline ====================let g:xtabline_settings = {}let g:xtabline_settings.enable_mappings = 0let g:xtabline_settings.tabline_modes = ['tabs', 'buffers']let g:xtabline_settings.enable_persistance = 0let g:xtabline_settings.last_open_first = 1let g:xtabline_settings.theme = "tomorrow"noremap \p :echo expand('%:p')<CR>" =================== vim-theme ===================="set background=dark " Setting dark modecolorscheme deuslet g:deus_termcolors=256""" explorer 快捷nmap ff <Cmd>CocCommand explorer<CR>" Close Coc-explorer if it is the only windowautocmd BufEnter * if (&ft == 'coc-explorer' && winnr("$") == 1) | q | endif" ================ Vista =================let g:vista_default_executive = 'ctags'" Set the executive for some filetypes explicitly. Use the explicit executive" instead of the default one for these filetypes when using `:Vista` without" specifying the executive.let g:vista_executive_for = {}" Declare the command including the executable and options used to generate ctags output" for some certain filetypes.The file path will be appened to your custom command." For example:let g:vista_ctags_cmd = { \ 'haskell': 'hasktags -x -o - -c', \ }" To enable fzf's preview window set g:vista_fzf_preview." The elements of g:vista_fzf_preview will be passed as arguments to fzf#vim#with_preview()" For example:let g:vista_fzf_preview = ['right:50%']" Ensure you have installed some decent font to show these pretty symbols, then you can enable icon for the kind.let g:vista#renderer#enable_icon = 1" The default icons can't be suitable for all the filetypes, you can extend it as you wish.let g:vista#renderer#icons = {\ "function": "\uf794",\ "variable": "\uf71b",\ }" 自定义tablineset showtabline=2" ============ tagbar ============let g:tagbar_width=30" 将tagbar的开关按键设置为 F4nnoremap <silent> <F4> :TagbarToggle<CR>" 启动 时自动focuslet g:tagbar_autofocus = 1