The currently available SSCLI 2.0 (Rotor) does not build successfully with Visual Studio 2008. I've managed to make it build and I thought I'd share my changes. Be very aware:
\sscli20\mswin32.startup.pl
if (my $msvcdir = Get("MSVCDir")) { # These are the INCLUDE paths used during the primary bootstrap. my $winsdkdir = Get("ROTOR_WINSDKDIR"); Set("SDK_INC_PATH_BOOT", catdir ($winsdkdir, "include")); Set("CRT_INC_PATH_BOOT", catdir ($msvcdir, "Include")); Set("SDK_LIB_PATH", catdir ($winsdkdir, "lib")); Set("CRT_LIB_PATH", catdir ($msvcdir, "lib")); Set("VC_BIN_PATH", catdir ($msvcdir, "bin")); }
if (my $msvcdir = Get("MSVCDir")) {
# These are the INCLUDE paths used during the primary bootstrap.
my $winsdkdir = Get("ROTOR_WINSDKDIR");
Set("SDK_INC_PATH_BOOT", catdir ($winsdkdir, "include"));
Set("CRT_INC_PATH_BOOT", catdir ($msvcdir, "Include"));
Set("SDK_LIB_PATH", catdir ($winsdkdir, "lib"));
Set("CRT_LIB_PATH", catdir ($msvcdir, "lib"));
Set("VC_BIN_PATH", catdir ($msvcdir, "bin"));
}
\sscli20\win.env.bat
REM Set the SDK path if "%ROTOR_WINSDKDIR%"=="" set ROTOR_WINSDKDIR=%WindowsSdkDir% if "%ROTOR_WINSDKDIR%"=="" set ROTOR_WINSDKDIR=%MSVCDIR%\PlatformSDK call :ShortName "%ROTOR_WINSDKDIR%" set ROTOR_WINSDKDIR=%RESULT%
REM Set the SDK path
if "%ROTOR_WINSDKDIR%"=="" set ROTOR_WINSDKDIR=%WindowsSdkDir%
if "%ROTOR_WINSDKDIR%"=="" set ROTOR_WINSDKDIR=%MSVCDIR%\PlatformSDK
call :ShortName "%ROTOR_WINSDKDIR%"
set ROTOR_WINSDKDIR=%RESULT%
\sscli20\clr\src\classlibnative\nls\wks\sources; \sscli20\clr\src\debug\daccess\wks\sources; \sscli20\clr\src\vm\dacwks\sources; \sscli\clr\src\classlibnative\float\wks\sources; \sscli\clr\src\dlls\mscordac\wks\sources; \sscli\clr\src\vm\wks1\sources; \sscli\clr\src\vm\wks2\sources; \sscli\clr\src\vm\wks3\sources; \sscli\clr\src\vm\wks4\sources
\sscli\clr\src\classlibnative\float\sources.inc
\sscli20\clr\src\toolbox\sos\strike\sources
\env\bin\devdiv.def
\pal\inc\vs9.h (NEW FILE)
// Patch up the conflicting defines to allow building with VS9 #undef MAKEWORD #undef MAKELONG #undef LOWORD #undef HIWORD #undef LOBYTE #undef HIBYTE #undef IPPROTO_IP #undef IPPROTO_ICMP #undef IPPROTO_IGMP #undef IPPROTO_GGP #undef IPPROTO_TCP #undef IPPROTO_PUP #undef IPPROTO_UDP #undef IPPROTO_IDP #undef IPPROTO_ND #undef IPPROTO_RAW #undef INADDR_ANY #undef INADDR_BROADCAST #undef INADDR_NONE #pragma warning (disable :4985) #define IMAGE_SIZEOF_NT_OPTIONAL32_HEADER 224 #define IMAGE_SIZEOF_NT_OPTIONAL64_HEADER 240 #ifdef _WIN64 #define IMAGE_SIZEOF_NT_OPTIONAL_HEADER IMAGE_SIZEOF_NT_OPTIONAL64_HEADER #else #define IMAGE_SIZEOF_NT_OPTIONAL_HEADER IMAGE_SIZEOF_NT_OPTIONAL32_HEADER #endif
// Patch up the conflicting defines to allow building with VS9
#undef MAKEWORD
#undef MAKELONG
#undef LOWORD
#undef HIWORD
#undef LOBYTE
#undef HIBYTE
#undef IPPROTO_IP
#undef IPPROTO_ICMP
#undef IPPROTO_IGMP
#undef IPPROTO_GGP
#undef IPPROTO_TCP
#undef IPPROTO_PUP
#undef IPPROTO_UDP
#undef IPPROTO_IDP
#undef IPPROTO_ND
#undef IPPROTO_RAW
#undef INADDR_ANY
#undef INADDR_BROADCAST
#undef INADDR_NONE
#pragma warning (disable :4985)
#define IMAGE_SIZEOF_NT_OPTIONAL32_HEADER 224
#define IMAGE_SIZEOF_NT_OPTIONAL64_HEADER 240
#ifdef _WIN64
#define IMAGE_SIZEOF_NT_OPTIONAL_HEADER IMAGE_SIZEOF_NT_OPTIONAL64_HEADER
#else
#define IMAGE_SIZEOF_NT_OPTIONAL_HEADER IMAGE_SIZEOF_NT_OPTIONAL32_HEADER
#endif
\sscli20\pal\win32\win32pal.h
\sscli20\tools\binplace\sources; \sscli\clr\src\tools\ildbdump\sources
\sscli20\tools\resourcecompiler\sources
\sscli20\tools\cppmunge\sources
\sscli20\tools\build\sources
\sscli20\pal\win32\make.cmd
\sscli20\clr\src\vm\sources.inc
\ssclie20\clr\src\classlibnative\nls\sources.inc
\sscli20\csharp\sccomp\sources.inc
\sscli20\pal\win32\rotor_pal.src
#if _MSC_VER == 1500 #define _MSVCRT MSVCR90D #elif _MSC_VER == 1400
#if _MSC_VER == 1500
#define _MSVCRT MSVCR90D
#elif _MSC_VER == 1400
#if _MSC_VER == 1500 #define _MSVCRT MSVCR90 #elif _MSC_VER == 1400
#define _MSVCRT MSVCR90
Well there you have it. Hopefully I didn't miss any of my changes or make too many typos. I ran through these instructions on a clean install of SSCLI and was able to successfully build per the docs and compile and run HelloWorld.