I’m trying to get the following simple C++ program to compile:
#include <stdio.h>
#include <stdlib.h>
using google::protobuf;
int main(void){
printf("Hello\n");
return 0;
}
I keep getting the following error:
error: ‘google’ has not been declared
I’ve linked to -lproto and have protobuf-compiler and libprotobuf-dev installed.
I’m totally stuck now.
Anyone have any ideas?
Many thanks in advance,
You don’t include any header which declares the
googlenamespace. You should include the header file generated by theprotoccompiler; it pulls in the necessary includes.