Caffe 2 C++ Error: google:protobuf::internal does not name a type?

I compiled pytorch in ubuntu. I followed these steps to install Caffe2:

  1. cd pytorch
  2. mkdir release && cd release
  3. cmake …
  4. make -j8
  5. sudo make install

Qt Creator .pro file:
INCLUDEPATH + = / usr / local / include / caffe2
LIBS + = -L / usr / local / lib -lcaffe2_detectron_ops_gpu -lcaffe2_nvrtc -lcaffe2_observers

INCLUDEPATH + = / usr / local / include / google / protobuf
LIBS + = -L / usr / local / lib -lprotobuf

Following code

main.cpp file:
#include <caffe2 / core / blob.h>
#incude <google / protobuf / any.h>

Bugs: no matching function for call to ‘google :: protobuf :: internal: InternalMetadata :: unknown_fields’ or’ google :: protobuf :: internal ‘does not name a type’

Any ideas? I am happy to provide any more details or share the project.

Thanks,