title: Onnx is not working. AttributeProto is not a name error
body: <p>I am trying to use onnx in c++ code. But when I try to use onnx/proto_utils.h I am getting
  error: 'AttributeProto' does not a name type. I am not sure is it some issue with my installation
  or what. I installed onnx from source, using readme.md installation instructions. If anybody
  has any clue what is wrong I would appraciate any help.</p>
  <p>Onnx installation steps:</p>
  <pre><code>git clone https://github.com/onnx/onnx.git
  cd onnx
  git submodule update --init --recursive
  python3 setup.py install
  sudo apt-get install protobuf-compiler libprotoc-dev
  pip3 install onnx
  </code></pre>
  <p>test.cpp</p>
  <pre><code>#include &lt;iostream&gt;
  #include &quot;onnx/onnx_pb.h&quot;
  #include &quot;onnx/proto_utils.h&quot;
  
  int main()
  {
      std::cout &lt;&lt; &quot;Hello\n&quot;;
  }
  </code></pre>
  <p>Compilation</p>
  <pre><code>g++ -DONNX_ML=1 test.cpp -o test -lprotobuf -I/home/bearnard/onnx/.setuptools-cmake-build/
  </code></pre>
  <p>Error Message</p>
  <pre><code>In file included from test.cpp:3:
  /usr/local/include/onnx/proto_utils.h:38:65: error: ‘AttributeProto’ does not name a type
     38 | template&lt;typename T&gt; inline std::vector&lt;T&gt; RetrieveValues(const AttributeProto&amp; attr);
        |                                                                 ^~~~~~~~~~~~~~
  /usr/local/include/onnx/proto_utils.h:39:61: error: ‘AttributeProto’ does not name a type
     39 | template&lt;&gt; inline std::vector&lt;int64_t&gt; RetrieveValues(const AttributeProto&amp; attr) {
        |                                                             ^~~~~~~~~~~~~~
  /usr/local/include/onnx/proto_utils.h: In function ‘std::vector&lt;T&gt; ONNX_NAMESPACE::RetrieveValues(const int&amp;) [with T = long int]’:
  /usr/local/include/onnx/proto_utils.h:40:16: error: request for member ‘ints’ in ‘attr’, which is of non-class type ‘const int’
     40 |   return {attr.ints().begin(), attr.ints().end()};
        |                ^~~~
  /usr/local/include/onnx/proto_utils.h:40:37: error: request for member ‘ints’ in ‘attr’, which is of non-class type ‘const int’
     40 |   return {attr.ints().begin(), attr.ints().end()};
        |                                     ^~~~
  /usr/local/include/onnx/proto_utils.h:40:49: error: could not convert ‘{&lt;expression error&gt;, &lt;expression error&gt;}’ from ‘&lt;brace-enclosed initializer list&gt;’ to ‘std::vector&lt;long int&gt;’
     40 |   return {attr.ints().begin(), attr.ints().end()};
        |                                                 ^
        |                                                 |
        |                                                 &lt;brace-enclosed initializer list&gt;
  /usr/local/include/onnx/proto_utils.h: At global scope:
  /usr/local/include/onnx/proto_utils.h:43:65: error: ‘AttributeProto’ does not name a type
     43 | template&lt;&gt; inline std::vector&lt;std::string&gt; RetrieveValues(const AttributeProto&amp; attr) {
        |                                                                 ^~~~~~~~~~~~~~
  /usr/local/include/onnx/proto_utils.h: In function ‘std::vector&lt;T&gt; ONNX_NAMESPACE::RetrieveValues(const int&amp;) [with T = std::__cxx11::basic_string&lt;char&gt;]’:
  /usr/local/include/onnx/proto_utils.h:44:17: error: request for member ‘strings’ in ‘attr’, which is of non-class type ‘const int’
     44 |   return { attr.strings().begin(), attr.strings().end() };
        |                 ^~~~~~~
  /usr/local/include/onnx/proto_utils.h:44:41: error: request for member ‘strings’ in ‘attr’, which is of non-class type ‘const int’
     44 |   return { attr.strings().begin(), attr.strings().end() };
        |                                         ^~~~~~~
  /usr/local/include/onnx/proto_utils.h:44:57: error: could not convert ‘{&lt;expression error&gt;, &lt;expression error&gt;}’ from ‘&lt;brace-enclosed initializer list&gt;’ to ‘std::vector&lt;std::__cxx11::basic_string&lt;char&gt; &gt;’
     44 |   return { attr.strings().begin(), attr.strings().end() };
        |                                                         ^
        |                                                         |
        |                                                         &lt;brace-enclosed initializer list&gt;
  /usr/local/include/onnx/proto_utils.h: At global scope:
  /usr/local/include/onnx/proto_utils.h:47:59: error: ‘AttributeProto’ does not name a type
     47 | template&lt;&gt; inline std::vector&lt;float&gt; RetrieveValues(const AttributeProto&amp; attr) {
        |                                                           ^~~~~~~~~~~~~~
  /usr/local/include/onnx/proto_utils.h: In function ‘std::vector&lt;T&gt; ONNX_NAMESPACE::RetrieveValues(const int&amp;) [with T = float]’:
  /usr/local/include/onnx/proto_utils.h:48:17: error: request for member ‘floats’ in ‘attr’, which is of non-class type ‘const int’
     48 |   return { attr.floats().begin(), attr.floats().end() };
        |                 ^~~~~~
  /usr/local/include/onnx/proto_utils.h:48:40: error: request for member ‘floats’ in ‘attr’, which is of non-class type ‘const int’
     48 |   return { attr.floats().begin(), attr.floats().end() };
        |                                        ^~~~~~
  /usr/local/include/onnx/proto_utils.h:48:55: error: could not convert ‘{&lt;expression error&gt;, &lt;expression error&gt;}’ from ‘&lt;brace-enclosed initializer list&gt;’ to ‘std::vector&lt;float&gt;’
     48 |   return { attr.floats().begin(), attr.floats().end() };
        |                                                       ^
        |                                                       |
        |                                                       &lt;brace-enclosed initializer list&gt;
  </code></pre>