I have a protobuf file with below content and generated pb.h & pb.cc files out of them.
Proto file content:
syntax = "proto3";
package person;
message Person{
string name = 1;
map<string, string> mp = 2;
}
I have a main.cpp file where i am trying to import generated code however i am getting "Protobuf requires at least C++11" error.
main.cpp content:
#include <string>
#include <map>
#include "./person.pb.h"
using namespace std;
int main() {
string greeting = "bishnu";
cout << greeting;
map<string, string> m;
return 0;
}
I am using macbook, intel chip and VS Stdio IDE.
I dont know what the issue is. Can somebody help me get this sorted? Any pointer to right document would also be helpful.
Aucun commentaire:
Enregistrer un commentaire