UE4 4.7.6 issues with my project

My system is Windows 8.1 with Visual Studios 2013 Community.

I got an issue while compiling UE4 in 32 bits, on 64 bits the errors vanish, here the error in 32 bits:

Module.Projects.cpp
1>g:\epic games\unrealengine-4.7.6-release\engine\source\developer\shadercompilercommon\private\HlslAST.h(209): error C2821: first formal parameter to 'operator new' must be 'size_t'
1>g:\epic games\unrealengine-4.7.6-release\engine\source\developer\shadercompilercommon\private\HlslAST.h(209): error C2333: 'CrossCompiler::AST::FNode::operator new' : error in function declaration; skipping function body
1>G:\Epic Games\UnrealEngine-4.7.6-release\Engine\Source\Developer\ShaderCompilerCommon\Private\HlslAST.cpp(853): error C2264: 'CrossCompiler::AST::FNode::operator new' : error in function definition or declaration; function not called
1>G:\Epic Games\UnrealEngine-4.7.6-release\Engine\Source\Developer\ShaderCompilerCommon\Private\HlslAST.cpp(854): error C3536: 'New': cannot be used before it is initialized
1>G:\Epic Games\UnrealEngine-4.7.6-release\Engine\Source\Developer\ShaderCompilerCommon\Private\HlslAST.cpp(854): error C2227: left of '->Type' must point to class/struct/union/generic type
1>          type is 'int'
1>G:\Epic Games\UnrealEngine-4.7.6-release\Engine\Source\Developer\ShaderCompilerCommon\Private\HlslAST.cpp(855): error C3536: 'New': cannot be used before it is initialized
1>G:\Epic Games\UnrealEngine-4.7.6-release\Engine\Source\Developer\ShaderCompilerCommon\Private\HlslAST.cpp(855): error C2227: left of '->Identifier' must point to class/struct/union/generic type
1>          type is 'int'
1>G:\Epic Games\UnrealEngine-4.7.6-release\Engine\Source\Developer\ShaderCompilerCommon\Private\HlslAST.cpp(856): error C3536: 'New': cannot be used before it is initialized
1>G:\Epic Games\UnrealEngine-4.7.6-release\Engine\Source\Developer\ShaderCompilerCommon\Private\HlslAST.cpp(856): error C2227: left of '->Semantic' must point to class/struct/union/generic type
1>          type is 'int'
1>G:\Epic Games\UnrealEngine-4.7.6-release\Engine\Source\Developer\ShaderCompilerCommon\Private\HlslAST.cpp(857): error C3536: 'New': cannot be used before it is initialized

So after the UE4 is build on 64 bits, when I try to build my project, I started from UT source renaming all the file to my game and stuffs, everything is done, when I compile I get this error, since I did not add any lib and I use UT source as a base, I don’t get why I get this…

C:\Program Files (x86)\Windows Kits\8.1\include\shared\ws2def.h(249): error C2872: 'INT' : ambiguous symbol
1>          could be 'C:\Program Files (x86)\Windows Kits\8.1\include\shared\minwindef.h(176) : int INT'
1>          or       'g:\epic games\unrealengine-4.7.6-release\engine\source\runtime\core\public\Misc/DisableOldUETypes.h(28) : DoNotUseOldUE4Type::INT'
1>C:\Program Files (x86)\Windows Kits\8.1\include\shared\ws2def.h(256): error C2872: 'INT' : ambiguous symbol
1>          could be 'C:\Program Files (x86)\Windows Kits\8.1\include\shared\minwindef.h(176) : int INT'
1>          or       'g:\epic games\unrealengine-4.7.6-release\engine\source\runtime\core\public\Misc/DisableOldUETypes.h(28) : DoNotUseOldUE4Type::INT'
1>C:\Program Files (x86)\Windows Kits\8.1\include\shared\ws2def.h(274): error C2872: 'INT' : ambiguous symbol
1>          could be 'C:\Program Files (x86)\Windows Kits\8.1\include\shared\minwindef.h(176) : int INT'
1>          or       'g:\epic games\unrealengine-4.7.6-release\engine\source\runtime\core\public\Misc/DisableOldUETypes.h(28) : DoNotUseOldUE4Type::INT'
1>C:\Program Files (x86)\Windows Kits\8.1\include\shared\ws2def.h(275): error C2872: 'INT' : ambiguous symbol
1>          could be 'C:\Program Files (x86)\Windows Kits\8.1\include\shared\minwindef.h(176) : int INT'
1>          or       'g:\epic games\unrealengine-4.7.6-release\engine\source\runtime\core\public\Misc/DisableOldUETypes.h(28) : DoNotUseOldUE4Type::INT'
1>C:\Program Files (x86)\Windows Kits\8.1\include\shared\ws2def.h(674): error C2872: 'INT' : ambiguous symbol
1>          could be 'C:\Program Files (x86)\Windows Kits\8.1\include\shared\minwindef.h(176) : int INT'
1>          or       'g:\epic games\unrealengine-4.7.6-release\engine\source\runtime\core\public\Misc/DisableOldUETypes.h(28) : DoNotUseOldUE4Type::INT'
1>C:\Program Files (x86)\Windows Kits\8.1\include\shared\ws2def.h(702): error C2872: 'INT' : ambiguous symbol
1>          could be 'C:\Program Files (x86)\Windows Kits\8.1\include\shared\minwindef.h(176) : int INT'
1>          or       'g:\epic games\unrealengine-4.7.6-release\engine\source\runtime\core\public\Misc/DisableOldUETypes.h(28) : DoNotUseOldUE4Type::INT'
1>C:\Program Files (x86)\Windows Kits\8.1\include\shared\ws2def.h(703): error C2872: 'INT' : ambiguous symbol
1>          could be 'C:\Program Files (x86)\Windows Kits\8.1\include\shared\minwindef.h(176) : int INT'
1>          or       'g:\epic games\unrealengine-4.7.6-release\engine\source\runtime\core\public\Misc/DisableOldUETypes.h(28) : DoNotUseOldUE4Type::INT'
1>C:\Program Files (x86)\Windows Kits\8.1\include\um\winso

I don’t know where the error came from since I don’t see from which file this error come, all the sources a compiled outside of the IDE, is there a way to know which file generated this problem? Also a hint what could cause this, maybe my .cs file are not ok, my project use the same layout and cs from the ShooterGame sample but the source are from UT.

Thank in advance
Sylvain

Hey -

I’m not sure exactly what you’re trying to do. When building the source code for the UE4 editor, this can only be built using Win64, not Win32. Renaming files in the solution is also not a good idea as it could corrupt communication between files.

As an example of setting up the engine source you should follow this workflow. First download the UE4 source from GitHub and unzip the file to your computer. From where you unzipped the file to you then run Setup.bat & GenerateProjectFiles.bat. Then open the UE4 solution in Visual Studio’s and build with the solution configuration set to Development Editor and the solution platform set to Win64. This will build the engine that will allow you to open the the editor and create a project.

Cheers

Where we need access to the Windows types in engine, we wrap the include in:

#include "AllowWindowsPlatformTypes.h"
#include "winsock.h"
#include "HideWindowsPlatformTypes.h"

https://answers.unrealengine.com/questions/27560/trouble-using-windows-includes-with-dword-int.html