Using Protobuffers (C++) with ESP-IDF
Posted: Mon Apr 15, 2019 4:09 pm
Hi!
I'm trying to use some C++ protobuffer files with my IDF project, but I'm having some issues getting it working. I've generated my test.pb.cc and test.pb.h files using protoc on my test.proto file. When I try to run "make" it fails when compiling test.pb.cc with the following error message:
I'm trying to use some C++ protobuffer files with my IDF project, but I'm having some issues getting it working. I've generated my test.pb.cc and test.pb.h files using protoc on my test.proto file. When I try to run "make" it fails when compiling test.pb.cc with the following error message:
I'm guessing this is an issue with my component.mk file? I'm not sure how to go about linking the Protobuf library in the component.mk. I got this working in a quick command line program I wrote and the makefile for that used -L ~/usr/local/lib in the LDFLAGS and -lprotobuf in the g++ command. Any ideas?In file included from /Users/ethan/Documents/Development/project/components/component/test/test/test.cpp:2:0:
/Users/ethan/Documents/Development/project/components/component/test/test/test.pb.h:10:40: fatal error: google/protobuf/port_def.inc: No such file or directory