记一个编译错误:命名冲突、宏定义、头文件包含顺序
摘要:错误信息:error C2059: syntax error : 'constant'*\JsonCpp\Value.h(126) : error C2574: 'Json::Value::Value(void)' : cannot be declared static原因: 目前的项目在用mongodb和jsoncpp,使用的mongodb版本的头文件中有一个宏定义“#define null (0)”,同时jsoncpp的Value类有一个常量“static const Value null;”,两个null命名冲突导致的问题,即当包含的头文件顺序使得mong
阅读全文