title: Moving Windows C++ project from Qt4 to 5 gives hundreds of seemingly unrelated compilation errors
body: <p>I upgraded to Qt5/msvc2010 and am now trying to build a project using Qt Creator that was working fine with Qt4/msvc2008 (no source code has changed since it was working).</p>
  
  <p>The project uses some COM elements to talk to external audio recording devices via an Olympus SDK.</p>
  
  <p>What could cause all of these errors when everything was working fine before I upgraded to Qt5? To my knowledge none of the classes listed in these errors are actually used by my project.</p>
  
  <p>I've tried including files that define the classes in question (e.g. ocidl.h for IEnumConnections) in every header file possible, even switching the order of includes to many different combinations to no avail.</p>
  
  <pre><code>e:\bp\mainwindow.h(21) : warning C4005: 'WINVER' : macro redefinition
          C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\sdkddkver.h(212) : see previous definition of 'WINVER'
  e:\bp\mainwindow.h(25) : warning C4005: '_WIN32_WINNT' : macro redefinition
          C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\sdkddkver.h(197) : see previous definition of '_WIN32_WINNT'
  C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\ocidl.h(53) : error C2146: syntax error : missing ';' before identifier 'IEnumConnections'
  C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\ocidl.h(53) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
  C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\ocidl.h(53) : error C2146: syntax error : missing ';' before identifier 'IEnumConnections'
  C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\ocidl.h(53) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
  C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\ocidl.h(53) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
  C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\ocidl.h(53) : error C2086: 'int IEnumConnections' : redefinition
          C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\ocidl.h(53) : see declaration of 'IEnumConnections'
  C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\ocidl.h(59) : error C2146: syntax error : missing ';' before identifier 'IConnectionPoint'
  C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\ocidl.h(59) : warning C4091: '' : ignored on left of 'interface' when no variable is declared
  C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\ocidl.h(65) : error C2146: syntax error : missing ';' before identifier 'IEnumConnectionPoints'
  C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\ocidl.h(65) : warning C4091: '' : ignored on left of 'interface' when no variable is declared
  C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\ocidl.h(71) : error C2146: syntax error : missing ';' before identifier 'IConnectionPointContainer'
  C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\ocidl.h(71) : warning C4091: '' : ignored on left of 'interface' when no variable is declared
  C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\ocidl.h(77) : error C2146: syntax error : missing ';' before identifier 'IClassFactory2'
  C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\ocidl.h(77) : warning C4091: '' : ignored on left of 'interface' when no variable is declared
  C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\ocidl.h(83) : error C2146: syntax error : missing ';' before identifier 'IProvideClassInfo'
  C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\ocidl.h(83) : warning C4091: '' : ignored on left of 'interface' when no variable is declared
  C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\ocidl.h(89) : error C2146: syntax error : missing ';' before identifier 'IProvideClassInfo2'
  C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\ocidl.h(89) : warning C4091: '' : ignored on left of 'interface' when no variable is declared
  </code></pre>
  
  <p>Full error listing is here: <a href="http://dpaste.com/1525608/" rel="nofollow">http://dpaste.com/1525608/</a></p>