【发布时间】:2010-11-04 10:30:36
【问题描述】:
gcc 4.4.4 c89
我的 state.c 文件中有以下内容:
enum State {
IDLE_ST,
START_ST,
RUNNING_ST,
STOPPED_ST,
};
State g_current_state = State.IDLE_ST;
我在尝试编译时收到以下错误。
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_current_state’
有没有在全局范围内声明枚举类型的变量?
非常感谢您的任何建议,
【问题讨论】:
标签: c