Blog
Compiling With Windows Media Format SDK
Date: 29/1/2008
This article is purely to document a fix for Google to index.

If you are trying to compile code that uses the Windows Media Format SDK and you are getting these sorts of errors:
2>d:\program files\wmsdk\wmfsdk11\include\shtypes.h(448) : error C2146: syntax error : missing ';' before identifier 'SHCOLUMNID'
2>d:\program files\wmsdk\wmfsdk11\include\shtypes.h(448) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
2>d:\program files\wmsdk\wmfsdk11\include\shtypes.h(448) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
2>d:\program files\wmsdk\wmfsdk11\include\shtypes.h(450) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
2>d:\program files\wmsdk\wmfsdk11\include\shtypes.h(450) : error C2143: syntax error : missing ';' before '*'
2>d:\program files\wmsdk\wmfsdk11\include\shtypes.h(450) : error C2378: 'SHCOLUMNID' : redefinition; symbol cannot be overloaded with a typedef
2>        d:\program files\wmsdk\wmfsdk11\include\shtypes.h(448) : see declaration of 'SHCOLUMNID'
2>d:\program files\wmsdk\wmfsdk11\include\shtypes.h(450) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
2>d:\program files\wmsdk\wmfsdk11\include\propsys.h(438) : error C2061: syntax error : identifier 'REFPROPVARIANT'
2>d:\program files\wmsdk\wmfsdk11\include\propsys.h(564) : error C2061: syntax error : identifier 'REFPROPVARIANT'


Then you'll find that re-ordering the include paths in your Visual C++ settings will help. Your path to the WMF SDK (???\WMSDK\WMFSDK11\include) needs to be before the ???\PlatformSDK\include line.

However you still get warnings about macros redefinitions.
 
Reply
From:
Email (optional): (Will be HTML encoded to evade harvesting)
Message:
 
Remember username and/or email in a cookie.
Notify me of new posts in this thread via email.
BBcode:
[q]text[/q]
[url=link]description[/url]
[img]url_to_image[/img]
[pre]some_code[/pre]
[b]bold_text[/b]