使用VC2008编译UIP协议栈代码,
#define LC_SET(s) s = __LINE__; case __LINE__:
提示 error C2051: case expression not constant
在编译配置页C++/general/debug info format中设置为/Zi,不使用/ZI,就可以了。
原文链接:http://www.codeguru.com/forum/archive/index.php/t-198413.html
本文介绍了解决在使用VC2008编译UIP协议栈时遇到的error C2051问题的方法。通过调整编译配置页C++/general/debuginfoformat设置为/Zi而非/ZI,成功解决了case表达式不是常量的错误。
使用VC2008编译UIP协议栈代码,
#define LC_SET(s) s = __LINE__; case __LINE__:
提示 error C2051: case expression not constant
在编译配置页C++/general/debug info format中设置为/Zi,不使用/ZI,就可以了。
原文链接:http://www.codeguru.com/forum/archive/index.php/t-198413.html
1612
4679

被折叠的 条评论
为什么被折叠?