Home  >  Q&A  >  body text

c++ - mac cannot find the file after installing with brew

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! ! ! ! !

大家讲道理大家讲道理2736 days ago684

reply all(2)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-16 13:22:46

    export CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:/usr/local/include"

    reply
    0
  • 黄舟

    黄舟2017-05-16 13:22:46

    gcc -I /usr/local/include

    reply
    0
  • Cancelreply