Hello,
The installation went fine without any error. Current version is libprotoc 3.9.2.
The generation of .c/.h classes went well also.
I have then included the generated classes into the project and created a basic executable:
#include "test.pb.h" // this is the generated header from .proto file
#include <fstream>
int main()
{
GOOGLE_PROTOBUF_VERIFY_VERSION;
tutorial::Person person;
person.set_name("John Doe");
person.set_id(1234);
std::ofstream output;
output.open("myfile", std::ios::out | std::ios::binary);
person.SerializeToOstream(&output);
output.close();
google::protobuf::ShutdownProtobufLibrary();
}
The project is compiling without any flaws, but when I try to execute it the following error returns:
[libprotobuf FATAL google/protobuf/generated_message_util.cc:818] CHECK failed: (scc->visit_status.load(std::memory_order_relaxed)) == (SCCInfoBase::kRunning):
terminate called after throwing an instance of 'google::protobuf::FatalException'
what(): CHECK failed: (scc->visit_status.load(std::memory_order_relaxed)) == (SCCInfoBase::kRunning):
Aborted (core dumped)
Can someone help me with that error?