I use Youcompleteme to auto complete my c++ code.
But I found can't find the std lib in class's method, like follows.
But in globe function, it works fine.
Also, ycm can't find the local lib, after I put the header in /usr/local/include
ls /usr/local/include/ | grep brpc
get the brpc
there.
I use the https://github.com/JDevlieghere/dotfiles/blob/master/.vim/.ycm_extra_conf.py config.
But change the flags follows.
C_BASE_FLAGS = [
┊ '-Wall',
┊ '-Wextra',
┊ '-Werror',
┊ '-Wno-long-long',
┊ '-Wno-variadic-macros',
┊ '-fexceptions',
┊ '-ferror-limit=10000',
┊ '-DNDEBUG',
┊ '-std=c11',
┊ '-I/usr/lib/',
┊ '-I/usr/include/'
┊ ]
CPP_BASE_FLAGS = [
┊ '-Wall',
┊ '-Wextra',
┊ '-Wno-long-long',
┊ '-Wno-variadic-macros',
┊ '-fexceptions',
┊ '-ferror-limit=10000',
┊ '-DNDEBUG',
┊ '-std=c++11',
┊ '-xc++',
┊ '-I/usr/lib/',
┊ '-I/usr/include/'
┊ '-I/usr/local/lib'
┊ '-I/usr/local/include'
┊ ]
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10)