自己定义的 #define CMD_ID_SERVER 1000
然后在proto文件里定义了
enum CMD_ID
{
CMD_ID_SERVER = 20000;
}
得到下面的错误
Error 7 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\zc\test\doloio\package\hello\hello.pb.h 46
Error 9 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\zc\test\doloio\package\hello\hello.pb.h 46
Error 10 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\zc\test\doloio\package\hello\hello.pb.h 47
Error 13 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\zc\test\doloio\package\hello\hello.pb.h 47
Error 20 error C2447: '{' : missing function header (old-style formal list?) e:\zc\test\doloio\package\hello\hello.pb.h 51
Error 27 error C2447: '{' : missing function header (old-style formal list?) e:\zc\test\doloio\package\hello\hello.pb.h 431
Error 17 error C2440: 'initializing' : cannot convert from 'const int' to 'const std::string &' e:\zc\test\doloio\package\hello\hello.pb.h 51
。。。。。。。。。。
------------------------------------------
其实根据错误信息应该很容易发现错误所在,但因为我心急,没能静下心来看错误信息以至浪费了更多的时间和精力于无谓的猜测试验