Closed Shashika007 closed 5 years ago
@Shashika007
Ok, I didn't expect that. It seems we must compile generate locally src/osmap.pb.cc and include/osmap.pb.h from osmap.proto, using protobuff compiler protoc with this command line:
$ protoc --cpp_out=. osmap.proto
Copy both generated files osmap.pb.cc and osmap.pb.h to src and include folder, rewriting previous files. Then compile orb-slam2 again.
Please let me know!
If you manage to do all this in cmake, please share the repository!
@AlejandroSilvestri
I tried to build this with orb_slam2. I also added the osmap.pb.cc and osmap.cpp to src folder, and osmap.pb.cc and osmap.h files to include folder and linked it trough CMakeLists.
Then i added -lprotobuf to target_link_libraries in CMakeLists. But i got the following error. Can you suggest me a way to solve this ? Do i need to install protobuf from the source https://github.com/protocolbuffers/protobuf/blob/master/src/README.md ?
**/ORB_SLAM2/include/osmap.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
error This file was generated by an older version of protoc which is**
thank you