title: fatal error: 'google/protobuf/compiler/plugin.h' file not found
body: <p>I'm compiling a Google protobuf plugin from <a href="https://github.com/eugeneego/protobuf-objc-arc" rel="nofollow noreferrer">these sources</a>.</p>
  
  <p>I've installed <a href="https://formulae.brew.sh/formula/protobuf@2.5" rel="nofollow noreferrer">protobuf@2.5</a> with the homebrew command:</p>
  
  <blockquote>
    <p>brew install protobuf@2.5</p>
  </blockquote>
  
  <p>After installation I get the following error when trying to compile by calling <code>make</code>:</p>
  
  <pre><code>Richards-Mac-mini:protobuf-objc-arc richard$ make
  /Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
  Making all in src/compiler
  g++ -DHAVE_CONFIG_H -I. -I../..     -g -O2 -DNDEBUG -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.cc
  main.cc:17:10: fatal error: 'google/protobuf/compiler/plugin.h' file not found
  #include &lt;google/protobuf/compiler/plugin.h&gt;
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 error generated.
  make[2]: *** [main.o] Error 1
  make[1]: *** [all-recursive] Error 1
  make: *** [all] Error 2
  </code></pre>
  
  <p>In particular, this line is interesting:</p>
  
  <blockquote>
    <p>fatal error: 'google/protobuf/compiler/plugin.h' file not found</p>
  </blockquote>
  
  <p>While I definitely able to go to this path and find the <code>plugin.h</code> file:</p>
  
  <blockquote>
    <p>/usr/local/Cellar/protobuf@2.5/2.5.0/include/google/protobuf/compiler/plugin.h</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/Y0GKf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y0GKf.png" alt="screenshot"></a></p>
  
  <p>Looks, like the library is not linked correctly with the binary and the issue is somehow related to the correct path.</p>
  
  <p>When I try to issue a command <code>which protoc</code>, I get:</p>
  
  <blockquote>
    <p>/usr/local/opt/protobuf@2.5/bin/protoc</p>
  </blockquote>
  
  <p><code>protoc --version</code> leads to the following output, which is expected.</p>
  
  <blockquote>
    <p>libprotoc 2.5.0</p>
  </blockquote>