I used homebrew to install gflags, glog and other packages, and then an error occurred when compiling a project, saying that the gflags.h file could not be found. Then I wrote a program test, and it was the same, as shown in the figure below.
But I found gflags myself in the /usr/local/include/ path, as shown in the figure below.
The problem now is that the installation file under this standard path is not included. Please ask Daniel how to solve it! ! ! ! !
export CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:/usr/local/include"
gcc -I /usr/local/include