自己定義的 #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
。。。。。。。。。。
------------------------------------------
其實根據錯誤信息應該很容易發現錯誤所在,但因為我心急,沒能靜下心來看錯誤信息以至浪費了更多的時間和精力于無謂的猜測試驗