Understanding Waf compilation errors.

Since i updated to 1.14 and vs2017 im not able to compile lumberyard anymore. Its the third day in a row of me trying to figure out why it fails (1.13 with vs2015 worked just fine).

The most anoying thing is that the error messages waf is showing doesn’t help me at all. For example:

 Build failed
-> task in 'cxxprogram (win_x64_vs2017|profile)' failed (exit status 1103):
{task 162625912L: cxxprogram ShaderCacheGen.cpp.85.obj,stdafx.cpp.85.obj -> ShaderCacheGen.exe,ShaderCacheGen.pdb}
'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX64\\x64\\LINK.exe /OUT: d:\\Amazon\\Lumberyard\\1.14.0.0\\dev\\Bin64vc141\\ShaderCacheGen.exe /MACHINE:X64 /NOLOGO /MANIFEST /LARGEADDRESSAWARE /INCREMENTAL:NO /OPT:REF /OPT:ICF /SUBSYSTEM:CONSOLE /DEBUG /PDBALTPATH:%_PDB% d:\\Amazon\\Lumberyard\\1.14.0.0\\dev\\BinTemp\\win_x64_vs2017_profile\\Code\\Tools\\ShaderCacheGen\\ShaderCacheGen\\ShaderCacheGen.cpp.85.obj d:\\Amazon\\Lumberyard\\1.14.0.0\\dev\\BinTemp\\win_x64_vs2017_profile\\Code\\Tools\\ShaderCacheGen\\ShaderCacheGen\\stdafx.cpp.85.obj /LIBPATH:Code\\Framework\\AzGameFramework\\AzGameFramework /LIBPATH:Code\\Framework\\AzFramework\\AzFramework /LIBPATH:Code\\Framework\\GridMate /LIBPATH:Code\\Framework\\GridMateForTools /LIBPATH:Code\\Framework\\AzCore\\AzCore /LIBPATH:D:\\Amazon\\Lumberyard\\1.14.0.0\\3rdParty\\Lua\\5.1.1.8-az\\build\\win_x64\\vc140\\release /LIBPATH:D:\\Amazon\\Lumberyard\\1.14.0.0\\3rdParty\\zlib\\1.2.8-pkg.2\\build\\win_x64\\vc140\\release AzGameFramework.lib AzFramework.lib GridMate.lib GridMateForTools.lib AzCore.lib lua.lib zlib.lib /LIBPATH:C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.14.26428\\ATLMFC\\lib\\x64 /LIBPATH:C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.14.26428\\lib\\x64 /LIBPATH:C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.6.1\\lib\\um\\x64 /LIBPATH:C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.17134.0\\ucrt\\x64 /LIBPATH:C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.17134.0\\um\\x64 /LIBPATH:C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.14.26428\\ATLMFC\\lib\\x64 /LIBPATH:C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.14.26428\\lib\\x64 /LIBPATH:C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.14.26428\\lib\\x86\\store\\references /LIBPATH:C:\\Program Files (x86)\\Windows Kits\\10\\UnionMetadata\\10.0.17134.0 /LIBPATH:C:\\Program Files (x86)\\Windows Kits\\10\\References\\10.0.17134.0 /LIBPATH:C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319 /LIBPATH:d:\\Amazon\\Lumberyard\\1.14.0.0\\dev\\Code User32.lib Advapi32.lib PsAPI.lib bcrypt.lib'

Looking into Code\Tools\ShaderCacheGen\ShaderCacheGen\ShaderCacheGen.cpp at 85

    #ifndef AZ_MONOLITHIC_BUILD
HMODULE hSystemHandle = LoadLibraryA("CrySystem.dll");
if (!hSystemHandle)
{
string errorStr;
errorStr.Format("Failed to load the CrySystem DLL!");
MessageBox(0, errorStr.c_str(), "Error", MB_OK | MB_DEFAULT_DESKTOP_ONLY);
return false;
}
PFNCREATESYSTEMINTERFACE CreateSystemInterface =
(PFNCREATESYSTEMINTERFACE)::GetProcAddress(hSystemHandle, "CreateSystemInterface");
#endif // AZ_MONOLITHIC_BUILD

The error waf seems to referring to is the if (!hSystemHandle) but i have no idea why because it doesn’t really say anything or it seems so for me.

Is there another error log that tells me more about WHY it failed or am i to stupid to see that everything i need is already in the waf error?

The last thing i will try is to download 1.14.0.1 and hope that there was an error in the version i have that has been fixed.