I want to compile C++ project using Windows SDK 7.1 for x86_32. I'm using clean Windows XP SP3 x86_32 with latest updates. Project (name doesn't matter) is a crossplatform one, is built using Makefiles (no vcxproj/msbuild) and contains only unmanaged C++ code (no C# or other managed code).
I've installed Windows SDK 7.1 (it requires .NET Framework 2.0 to run installer and .NET Framework 4.0 to install C++ compiler), set compile environment using SetEnv.cmd script from SDK and built project successfully.
Now I need to test build on different Windows versions (2003, Vista, 7, 2008) using the same Windows SDK. I don't want to install Windows SDK from ISO every time I need to test build on clean OS - it takes a lot of time. Instead, I want to have a folder with C++ compiler, that I can copy to clean Windows instance, copy code sources next to it and run batch script to start build.
So I copied all Windows SDK files to another folder uninstalled Windows SDK, C++ Compilers and .NET Framework 2.0. Than copied Windows SDK files back to original folders (I can move them anywhere changing SetEnv.cmd script accordingly). After that build works fine.
But when I uninstalled .NET Framework 4.0, build fails on link.exe
call:
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
I thought, that link.exe
use some libraries or tools from .NET Framework 4.0 installation, so I copied C:\WINDOWS\Microsoft.NET
folder before uninstallation and then copy it back to original place. That doesn't help.
I googled LNK1123
and only advices were: "install VS2010SP1" (that I don't use at all) and "reinstall .NET Framework 4.0" (that works, but this is exactly the thing I'm trying to avoid).
Different compilers is not an option: on Windows this project supports only compiler from VS2010 (that is included in Windows SDK 7.1).
I'm in confusion - does link.exe
for x86_32 from Windows SDK 7.1 really requires .NET Framework 4.0 runtime (not some libraries or native tools) to build completely native and unmanaged C++ code (that is not going to be used with CLR in any way)?
mscoree.dll
is not required for the build butmsvcr100_clr0400.dll
is required and was missed fromsystem32
after framework uninstall. – alexkasko