‘obj_type’ was not declared in this scope, note: suggested alternative: enum Value_type
问题 I'm using JSON Spirit to parse and generate json. I cannot use using namespace json_spirit because another library uses conflicting names. I'm trying to detect the type as specified here of a read message with if(message.type() == obj_type) but the compiler reports error: ‘obj_type’ was not declared in this scope if(stamper_message.type() == obj_type){ ^ note: suggested alternative: In file included from /usr/local/include/json_spirit.h:13:0: /usr/local/include/json_spirit_value.h:32:22: note