Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compile errors in mshtml.h compiling with VS2008

I'm in the process of moving one of our projects from VS6 to VS2008 and I've hit the following compile error with mshtml.h:

1>c:\program files\microsoft sdks\windows\v6.0a\include\mshtml.h(5272) : error C2143: syntax error : missing '}' before 'constant'
1>c:\program files\microsoft sdks\windows\v6.0a\include\mshtml.h(5275) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft sdks\windows\v6.0a\include\mshtml.h(5275) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\mshtml.h(28523) : error C2059: syntax error : '}'
1>c:\program files\microsoft sdks\windows\v6.0a\include\mshtml.h(28523) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft sdks\windows\v6.0a\include\mshtml.h(28523) : error C2059: syntax error : '}'

Following the first error statement drops into this part of the mshtml.h code, pointing at the "True = 1" line:

EXTERN_C const GUID CLSID_CDocument;
EXTERN_C const GUID CLSID_CScriptlet;
typedef 
enum _BoolValue
    {   True    = 1,
    False   = 0,
    BoolValue_Max   = 2147483647L
    }   BoolValue;

EXTERN_C const GUID CLSID_CPluginSite;

It looks like someone on expert-sexchange also came across this error but I'd rather not dignify that site with a "7 day free trial".

Any suggestions would be most welcome.

like image 940
Lou Avatar asked Apr 01 '26 00:04

Lou


1 Answers

you might already have the symbols True & False defined, try

#undef True 
#undef False 

before including that file.

like image 70
John Boker Avatar answered Apr 02 '26 12:04

John Boker



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!