In particular, if you are getting `case expression not constant'
errors when building with MS Visual Studio, this is because MS's
Edit and Continue debugging feature causes their compiler to
violate ANSI C. To disable Edit and Continue debugging:
- right-click ssh.c in the FileView
- click Settings
- select the C/C++ tab and the General category
- under `Debug info:', select anything _other_ than `Program
Database for Edit and Continue'.
如文中描述,把这一项换成只要不是 “Program Database for Edit and Continue” 就行。
https://stackoverflow.com/questions/11461915/visual-studio-9-0-error-c2051-case-expression-not-constant
In particular, if you are getting `case expression not constant'
errors when building with MS Visual Studio, this is because MS's
Edit and Continue debugging feature causes their compiler to
violate ANSI C. To disable Edit and Continue debugging:
- right-click ssh.c in the FileView
- click Settings
- select the C/C++ tab and the General category
- under `Debug info:', select anything _other_ than `Program
Database for Edit and Continue'.
如文中描述,把这一项换成只要不是 “Program Database for Edit and Continue” 就行。