title: Google Protocol Buffers. C++ error: 'protobuf' does not name a type
body: <p>I have the following code which I'm really struggling to compile:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include "test.pb.h"
  
  using namespace google::protobuf;
  using namespace std;
  
  
  protobuf::RpcChannel* channel;   //error on this line!
  </code></pre>
  
  <p>I keep getting this <code>'protobuf' does not name a type</code> error. I have no idea how to fix this ;(</p>
  
  <p>Any insight greatly appreciated.</p>
  
  <p>Many thanks in advance,</p>