Win2008 Support

May 1, 2009 at 8:39 PM
I'm having an issue building the Win2008 configuration. I get the following build errors.

Error    1    error C2146: syntax error : missing ';' before identifier 'hdr'    C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\prsht.h    666    AlphaVSS.Platform.vcproj
Error    2    error C4430: missing type specifier - int assumed. Note: C++ does not support default-int    C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\prsht.h    666    AlphaVSS.Platform.vcproj
Error    3    error C4430: missing type specifier - int assumed. Note: C++ does not support default-int    C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\prsht.h    666    AlphaVSS.Platform.vcproj
Error    5    error C2065: 'VSS_VOLUME_PROTECTION_INFO' : undeclared identifier    d:\testapp\epm\alphavss.platform\include\FactoryMethods.h    41    AlphaVSS.Platform.vcproj
Error    6    error C2065: 'info' : undeclared identifier    d:\testapp\epm\alphavss.platform\include\FactoryMethods.h    41    AlphaVSS.Platform.vcproj
Error    7    error C3145: 'CreateVssVolumeProtectionInfo' : global or static variable may not have managed type 'Alphaleonis::Win32::Vss::VssVolumeProtectionInfo ^'    d:\testapp\epm\alphavss.platform\include\FactoryMethods.h    41    AlphaVSS.Platform.vcproj
Error    8    fatal error C1903: unable to recover from previous error(s); stopping compilation    d:\testapp\epm\alphavss.platform\include\FactoryMethods.h    41    AlphaVSS.Platform.vcproj

I found that the WINVER definition isn't being set correctly. I've tried to make sense of the #define declarations but some of them seem inconsistent. Any help would be appreciated.

Coordinator
May 1, 2009 at 8:45 PM
I see from the paths in your error messages that you are trying to build against version 6.0a of the Windows SDK. You need version 6.1 of the Windows SDK installed to be able to build correctly. This version is perhaps better known as "Windows SDK for Windows Server 2008 and .NET Framework 3.5"  and is available from here.

Hope this helps!

Sincerely, Peter
May 1, 2009 at 9:03 PM
Edited May 1, 2009 at 9:07 PM
Will I be able to install the new SDK on a Win2003 machine? Should I be able to build the AlphaVSS libraries on a Win2003 machine as long as I have all the include files available?


Through hunting down the issue I found that on line 78 of the Config.h file (#define _WIN32_WINNT _WIN32_WINNT_WS08) that there wasn't a definition for _WIN32_WINNT_WS08. I found where the _WIN32_WINNT_WS03 value is defined for line 72 in Config.h at line 26 in sdkddkver.h and I noticed that there was a _WIN32_WINNT_LONGHORN value defined but not the _WIN32_WINNT_WS08 value that is referenced. I added a definition for _WIN32_WINNT_WS08 with the same value as the longhorn one and I was able to get it to build except for a couple other undeclared identifies. Line 41 in FactoryMethods.h fails because VSS_VOLUME_PROTECTION_INFO is an undeclared identifier. I wasn’t able to find where this was declared at after doing a text search so I commented out line 103 in Config.h because I'm not using that functionality at least for the moment. After commenting out that line I was able to get 32bit to build but 64bit fails on line 159 in VssBackupComponents.cpp with another undeclared identifier for _VSS_HARDWARE_OPTIONS. I commented line 99 in Config.h because I’m also not using that functionality for the moment and I was able to get it to build and it all seemed to work on my Win2008 test box. My development box is a Win2003 32bit. I'm not sure if some of these tweaks are going to break stuff. I'm downloading the newer sdk and am going to see if I can install it.


Coordinator
May 1, 2009 at 9:06 PM
You should definately be able to build AlphaVSS on Windows 2003, provided the correct Windows SDK is installed. The missing identifiers were introduced in version 6.1. If I remember correctly there are VSS stuff missing from version 6.0 as well, so it is unlikely you will be able to tweak it into a successful build without installing 6.1.
May 1, 2009 at 9:09 PM
I was able to tweak it into a successful build and got it to run, but I'm not sure if it broke anything. I'll install the SDK and report back if I am still having trouble. Thanks for your help.