I've recently switched from Visual Studio 2010 to Visual Studio 2012. The project I'm working on uses the BitwiseEnums library from MiLi. I'm including just the BitwiseEnums library as per the instructions here, so the only file being added to my project is bitwise_enums.h.
In VS2010 I had no issues. In VS2012 I'm getting the following error message whenever I #include bitwise_enums.h and try to compile:
1>c:\program files (x86)\windows kits\8.0\include\um\oaidl.h(319):
error C2057: expected constant expression
When I check the external dependencies for my project, it does list the file oaidl.h. Looking inside this file, I find the following statement which ends on line 319.
typedef /* [v1_enum] */
enum tagSF_TYPE
{
SF_ERROR = VT_ERROR,
SF_I1 = VT_I1,
SF_I2 = VT_I2,
SF_I4 = VT_I4,
SF_I8 = VT_I8,
SF_BSTR = VT_BSTR,
SF_UNKNOWN = VT_UNKNOWN,
SF_DISPATCH = VT_DISPATCH,
SF_VARIANT = VT_VARIANT,
SF_RECORD = VT_RECORD,
SF_HAVEIID = ( VT_UNKNOWN | VT_RESERVED )
} SF_TYPE; // Line 319
My questions are:
- What is oaidl.h and what is causing it to be included in my project?
- What does the error message mean, and how can I fix it?
- What could be a reason for this error only occurring in VS2012?