title: What is the correct way to include a proto file in C++?
body: <p>I'm trying to learn C++ but I'm failing at some basic steps, like this one. I have a .proto file that needs to be included from a .cc file. </p>
  
  <p>I added the line:</p>
  
  <pre><code>#include "path/to/my/protofile.pb.h"
  </code></pre>
  
  <p>I edited the matching BUILD file, by adding: </p>
  
  <pre><code>proto_library(
      name = "protofile_proto",
      srcs = ["//path/to/my:protofile.proto"],
      visibility = [
          "//visibility:public",
      ],
  )
  </code></pre>
  
  <p>When I try to compile it, I get the following error:</p>
  
  <pre><code>path/to/my/ccfile.cc
  fatal error: 'path/to/my/protofile.pb.h' file not found
  </code></pre>
  
  <p>Any idea on how to get the compiler to find the proto file at build time? Thanks in advance.</p>