Error C4503 when compiling on UE 4.9

Hi all,

My project works fun on Unreal Engine 4.8. I using boost in my project and all work fun.
But when I trying to transplant to UE 4.9, I got some compile error with boost:

error C4503:	 “boost_asio_handler_invoke_helpers::invoke”: : decorated name length exceeded, name was truncatedC:\Users\...\ThirdPart\boost_1_58_0\boost\asio\detail\bind_handler.hpp	126

and when using UE 4.8 this had never happened.

Furthermore, C4503 seems like only a warning by default,and I have never found that warning in 4.8 before.But in UE 4.9, it cause a compile error.

So I think maybe a compile flag has pass to VC like “we4503” and I don’t know where to find this flag or how to fix this error.

Could someone help me? Thanks a lot!!!

I have print the build command, it is

  "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\../../VC/bin/amd64\cl.exe"  /nologo /Oi /c /Gy /Zm800 /wd4819 /wd4651 /wd4005 /D_WINDLL /Ox /Ot /Ob2 /errorReport:prompt /EHsc /Z7 /MD /bigobj /fp:fast /Zo /Zp8 /I "C:\Program Files\Epic Games\4.9\Engine\Source" /I C:\Users\hao.xu\Desktop\Morpheus\ThirdPart\ /I C:\Users\hao.xu\Desktop\Morpheus\ThirdPart\Websocketpp /I C:\Users\hao.xu\Desktop\Morpheus\ThirdPart\boost_1_58_0 /I C:\Users\hao.xu\Desktop\Morpheus\ThirdPart\opencv-3.0.0\build\include /I ../../../../../Users/hao.xu/Desktop/Morpheus/Source /I ../../../../../Users/hao.xu/Desktop/Morpheus/Intermediate/Build/Win64/UE4Editor/Inc/Morpheus /I Runtime/Core/Public /I Runtime/Core/Public/Internationalization /I Runtime/Core/Public/Async /I Runtime/Core/Public/Containers /I Runtime/Core/Public/Delegates /I Runtime/Core/Public/GenericPlatform /I Runtime/Core/Public/HAL /I Runtime/Core/Public/Logging /I Runtime/Core/Public/Math /I Runtime/Core/Public/Misc /I Runtime/Core/Public/Modules /I Runtime/Core/Public/Modules/Boilerplate /I Runtime/Core/Public/ProfilingDebugging /I Runtime/Core/Public/Serialization /I Runtime/Core/Public/Serialization/Csv /I Runtime/Core/Public/Stats /I Runtime/Core/Public/Templates /I Runtime/Core/Public/UObject /I Runtime/Core/Public/Windows /I Runtime/Core /I Runtime/CoreUObject/Classes /I Runtime/CoreUObject/Public /I Runtime/CoreUObject/Public/Blueprint /I Runtime/CoreUObject/Public/Misc /I Runtime/CoreUObject/Public/Serialization /I Runtime/CoreUObject/Public/Templates /I Runtime/CoreUObject/Public/UObject /I ../Intermediate/Build/Win64/UE4Editor/Inc/CoreUObject /I Runtime/CoreUObject /I Runtime/Engine/Classes /I Runtime/Engine/Public /I Runtime/Engine/Public/AI /I Runtime/Engine/Public/Animation /I Runtime/Engine/Public/EdGraph /I Runtime/Engine/Public/Features /I Runtime/Engine/Public/Net /I Runtime/Engine/Public/Slate /I Runtime/Engine/Public/Tests /I Runtime/Engine/Public/VisualLogger /I Runtime/Engine/Public/AI/Navigation /I ../Intermediate/Build/Win64/UE4Editor/Inc/Engine /I Runtime/Json/Public /I Runtime/Json/Public/Dom /I Runtime/Json/Public/Policies /I Runtime/Json/Public/Serialization /I Runtime/Json /I Runtime/SlateCore/Public /I Runtime/SlateCore/Public/Animation /I Runtime/SlateCore/Public/Application /I Runtime/SlateCore/Public/Brushes /I Runtime/SlateCore/Public/Fonts /I Runtime/SlateCore/Public/Input /I Runtime/SlateCore/Public/Layout /I Runtime/SlateCore/Public/Logging /I Runtime/SlateCore/Public/Rendering /I Runtime/SlateCore/Public/Sound /I Runtime/SlateCore/Public/Stats /I Runtime/SlateCore/Public/Styling /I Runtime/SlateCore/Public/Textures /I Runtime/SlateCore/Public/Types /I Runtime/SlateCore/Public/Widgets /I ../Intermediate/Build/Win64/UE4Editor/Inc/SlateCore /I Runtime/InputCore/Classes /I Runtime/InputCore/Public /I ../Intermediate/Build/Win64/UE4Editor/Inc/InputCore /I Runtime/InputCore /I Runtime/SlateCore /I Runtime/Slate/Public /I Runtime/Slate/Public/Framework /I Runtime/Slate/Public/Widgets /I Runtime/Slate/Public/Framework/Application /I Runtime/Slate/Public/Framework/Commands /I Runtime/Slate/Public/Framework/Docking /I Runtime/Slate/Public/Framework/Layout /I Runtime/Slate/Public/Framework/MultiBox /I Runtime/Slate/Public/Framework/Notifications /I Runtime/Slate/Public/Framework/Styling /I Runtime/Slate/Public/Framework/Text /I Runtime/Slate/Public/Framework/Views /I Runtime/Slate/Public/Framework/Text/Android /I Runtime/Slate/Public/Framework/Text/IOS /I Runtime/Slate/Public/Widgets/Colors /I Runtime/Slate/Public/Widgets/Docking /I Runtime/Slate/Public/Widgets/Images /I Runtime/Slate/Public/Widgets/Input /I Runtime/Slate/Public/Widgets/LayerManager /I Runtime/Slate/Public/Widgets/Layout /I Runtime/Slate/Public/Widgets/Navigation /I Runtime/Slate/Public/Widgets/Notifications /I Runtime/Slate/Public/Widgets/Text /I Runtime/Slate/Public/Widgets/Views /I ../Intermediate/Build/Win64/UE4Editor/Inc/Slate /I Runtime/Slate /I Runtime/Messaging/Public /I Runtime/Messaging/Public/Deprecated /I Runtime/Messaging/Public/Helpers /I Runtime/Messaging /I Runtime/RenderCore/Public /I Runtime/RenderCore /I Runtime/RHI/Public /I Runtime/RHI /I Runtime/ShaderCore/Public /I Runtime/ShaderCore /I Runtime/AssetRegistry/Public /I Runtime/AssetRegistry /I Editor/CookingStats/Public /I Editor/CookingStats /I Runtime/EngineMessages/Classes /I Runtime/EngineMessages/Public /I ../Intermediate/Build/Win64/UE4Editor/Inc/EngineMessages /I Runtime/EngineMessages /I Runtime/EngineSettings/Classes /I Runtime/EngineSettings/Public /I ../Intermediate/Build/Win64/UE4Editor/Inc/EngineSettings /I Runtime/EngineSettings /I Developer/SynthBenchmark/Public /I Runtime/Renderer/Public /I Runtime/Renderer /I Developer/SynthBenchmark /I Runtime/AIModule/Public /I Runtime/AIModule/Classes /I ../Intermediate/Build/Win64/UE4Editor/Inc/AIModule /I Runtime/GameplayTags/Classes /I Runtime/GameplayTags/Public /I ../Intermediate/Build/Win64/UE4Editor/Inc/GameplayTags /I Runtime/GameplayTags /I Runtime/GameplayTasks/Classes /I Runtime/GameplayTasks/Public /I ../Intermediate/Build/Win64/UE4Editor/Inc/GameplayTasks /I Runtime/GameplayTasks /I Runtime/AIModule /I Runtime/DatabaseSupport/Public /I Runtime/DatabaseSupport /I Editor/UnrealEd/Classes /I Editor/UnrealEd/Public /I Editor/UnrealEd/Public/AutoReimport /I Editor/UnrealEd/Public/Commandlets /I Editor/UnrealEd/Public/Dialogs /I Editor/UnrealEd/Public/DragAndDrop /I Editor/UnrealEd/Public/Features /I Editor/UnrealEd/Public/Kismet2 /I Editor/UnrealEd/Public/Layers /I Editor/UnrealEd/Public/Localization /I Editor/UnrealEd/Public/Settings /I Editor/UnrealEd/Public/Tests /I Editor/UnrealEd/Public/Toolkits /I ../Intermediate/Build/Win64/UE4Editor/Inc/UnrealEd /I Editor/BspMode/Public /I Editor/BspMode /I Developer/DirectoryWatcher/Public /I Developer/DirectoryWatcher /I Editor/Documentation/Public /I Editor/Documentation /I Runtime/Projects/Public /I Runtime/Projects/Public/Interfaces /I Runtime/Projects /I Runtime/SandboxFile/Public /I Runtime/SandboxFile /I Editor/EditorStyle/Public /I Editor/EditorStyle/Public/Classes /I Editor/EditorStyle/Public/Interfaces /I ../Intermediate/Build/Win64/UE4Editor/Inc/EditorStyle /I Editor/EditorStyle /I Developer/SourceControl/Public /I Developer/SourceControl/Public/Tests /I Developer/SourceControl /I Editor/UnrealEdMessages/Classes /I Editor/UnrealEdMessages/Public /I ../Intermediate/Build/Win64/UE4Editor/Inc/UnrealEdMessages /I Editor/UnrealEdMessages /I Editor/BlueprintGraph/Classes /I Editor/BlueprintGraph/Public /I ../Intermediate/Build/Win64/UE4Editor/Inc/BlueprintGraph /I Editor/BlueprintGraph /I Runtime/Online/HTTP/Public /I Runtime/Online/HTTP/Public/Interfaces /I Runtime/Online/HTTP /I Runtime/UnrealAudio/Public /I Runtime/UnrealAudio /I Runtime/Niagara/Classes /I Runtime/Niagara/Public /I ../Intermediate/Build/Win64/UE4Editor/Inc/Niagara /I Runtime/MovieScene/Public /I ../Intermediate/Build/Win64/UE4Editor/Inc/MovieScene /I Runtime/MovieScene /I Runtime/Niagara /I Runtime/VectorVM/Public /I ../Intermediate/Build/Win64/UE4Editor/Inc/VectorVM /I Runtime/VectorVM /I Runtime/Windows/XAudio2/Public /I Runtime/Windows/XAudio2 /I Runtime/Windows/UnrealAudioXAudio2 /I Editor/UserFeedback/Public /I Editor/UserFeedback /I Developer/CollectionManager/Public /I Developer/CollectionManager /I Editor/NiagaraEditor/Public /I ../Intermediate/Build/Win64/UE4Editor/Inc/NiagaraEditor /I Editor/GraphEditor/Public /I Editor/GraphEditor/Public/KismetNodes /I ../Intermediate/Build/Win64/UE4Editor/Inc/GraphEditor /I Editor/IntroTutorials/Public /I ../Intermediate/Build/Win64/UE4Editor/Inc/IntroTutorials /I Editor/IntroTutorials /I Editor/GraphEditor /I Editor/LevelEditor/Public /I Developer/Settings/Public /I Developer/Settings /I Editor/LevelEditor /I Editor/NiagaraEditor /I Editor/AddContentDialog/Public /I ../Intermediate/Build/Win64/UE4Editor/Inc/AddContentDialog /I Editor/AddContentDialog /I Editor/UnrealEd /I Editor/Kismet/Classes /I Editor/Kismet/Public /I Editor/Kismet/Public/Nodes /I Editor/Kismet/Public/WorkflowOrientedApp /I ../Intermediate/Build/Win64/UE4Editor/Inc/Kismet /I Editor/Kismet /I Runtime/PacketHandlers/PacketHandler/Public /I Runtime/PacketHandlers/PacketHandler /I Runtime/Engine /I Runtime/Sockets/Public /I Runtime/Sockets /I Runtime/Networking/Public /I Runtime/Networking/Public/Common /I Runtime/Networking/Public/Interfaces /I Runtime/Networking/Public/Interfaces/IPv4 /I Runtime/Networking/Public/Interfaces/Steam /I Runtime/Networking /I ../../../../../Users/hao.xu/Desktop/Morpheus/Source/Morpheus /I ../../../../../Users/hao.xu/Desktop/Morpheus/Plugins/Runtime/Coherent/CoherentUIPlugin/Source/CoherentUIPlugin/Classes /I ../../../../../Users/hao.xu/Desktop/Morpheus/Plugins/Runtime/Coherent/CoherentUIPlugin/Source/CoherentUIPlugin/Public /I ../../../../../Users/hao.xu/Desktop/Morpheus/Plugins/Runtime/Coherent/CoherentUIPlugin/Intermediate/Build/Win64/UE4Editor/Inc/CoherentUIPlugin /I ../../../../../Users/hao.xu/Desktop/Morpheus/Plugins/Runtime/Coherent/CoherentUIPlugin/Source/CoherentUIPlugin /I ThirdParty/CoherentUI/include /I ThirdParty/CoherentUI /DUE_EDITOR=1 /DIS_PROGRAM=0 /DUNICODE /D_UNICODE /D__UNREAL__ /DIS_MONOLITHIC=0 /DWITH_ENGINE=1 /DWITH_UNREAL_DEVELOPER_TOOLS=1 /DWITH_COREUOBJECT=1 /DUSE_STATS_WITHOUT_ENGINE=0 /DWITH_PLUGIN_SUPPORT=0 /DUSE_LOGGING_IN_SHIPPING=0 /DUE_BUILD_MINIMAL=0 /DWITH_EDITOR=1 /DWITH_SERVER_CODE=1 /DUBT_COMPILED_PLATFORM=Win64 /DWIN32=1 /D_WIN32_WINNT=0x0600 /DWINVER=0x0600 /DPLATFORM_WINDOWS=1 /DNDEBUG=1 /DUE_BUILD_DEVELOPMENT=1 /DORIGINAL_FILE_NAME=\"UE4Editor-Morpheus.dll\" /DDEPRECATED_FORGAME=DEPRECATED /DMORPHEUS_API=DLLEXPORT /DUE_ENABLE_ICU=1 /DWITH_STEAMWORKS=1 /DWITH_DIRECTXMATH=0 /DCORE_API=DLLIMPORT /DCOREUOBJECT_API=DLLIMPORT /DWITH_PHYSX=1 /DWITH_APEX=1 /DWITH_RUNTIME_PHYSICS_COOKING /DWITH_BOX2D=1 /DWITH_RECAST=1 /DENGINE_API=DLLIMPORT /DJSON_API=DLLIMPORT /DWITH_FREETYPE=1 /DSLATECORE_API=DLLIMPORT /DINPUTCORE_API=DLLIMPORT /DWITH_FREETYPE=1 /DSLATE_API=DLLIMPORT /DMESSAGING_API=DLLIMPORT /DRENDERCORE_API=DLLIMPORT /DRHI_API=DLLIMPORT /DSHADERCORE_API=DLLIMPORT /DASSETREGISTRY_API=DLLIMPORT /DCOOKINGSTATS_API=DLLIMPORT /DENGINEMESSAGES_API=DLLIMPORT /DENGINESETTINGS_API=DLLIMPORT /DSYNTHBENCHMARK_API=DLLIMPORT /DRENDERER_API= /DWITH_RECAST=1 /DAIMODULE_API=DLLIMPORT /DGAMEPLAYTAGS_API=DLLIMPORT /DGAMEPLAYTASKS_API=DLLIMPORT /DDATABASESUPPORT_API=DLLIMPORT /DWITH_PHYSX=1 /DWITH_APEX=1 /DWITH_RUNTIME_PHYSICS_COOKING /DWITH_RECAST=1 /DUNREALED_API=DLLIMPORT /DBSPMODE_API=DLLIMPORT /DDIRECTORYWATCHER_API=DLLIMPORT /DDOCUMENTATION_API=DLLIMPORT /DPROJECTS_API=DLLIMPORT /DSANDBOXFILE_API=DLLIMPORT /DEDITORSTYLE_API=DLLIMPORT /DSOURCECONTROL_API=DLLIMPORT /DUNREALEDMESSAGES_API=DLLIMPORT /DBLUEPRINTGRAPH_API=DLLIMPORT /DHTTP_PACKAGE=1 /DHTTP_API=DLLIMPORT /DUNREALAUDIO_API=DLLIMPORT /DNIAGARA_API=DLLIMPORT /DMOVIESCENE_API=DLLIMPORT /DVECTORVM_API=DLLIMPORT /DXAUDIO2_API=DLLIMPORT /DUNREALAUDIOXAUDIO2_API=DLLIMPORT /DUSERFEEDBACK_API= /DCOLLECTIONMANAGER_API= /DNIAGARAEDITOR_API= /DGRAPHEDITOR_API= /DINTROTUTORIALS_API= /DLEVELEDITOR_API= /DSETTINGS_API= /DADDCONTENTDIALOG_API= /DKISMET_API=DLLIMPORT /DPACKETHANDLER_API= /DSOCKETS_PACKAGE=1 /DSOCKETS_API=DLLIMPORT /DNETWORKING_API=DLLIMPORT /DCOHERENTUIPLUGIN_API=DLLIMPORT /Yu"C:\Users\hao.xu\Desktop\Morpheus\Source\Morpheus\Morpheus.h" /Fp"C:\Users\hao.xu\Desktop\Morpheus\Intermediate\Build\Win64\UE4Editor\Development\Morpheus\Morpheus.h.pch" /FI"C:\Users\hao.xu\Desktop\Morpheus\Source\Morpheus\Morpheus.h" "C:\Users\hao.xu\Desktop\Morpheus\Source\Morpheus\DJIA3ClientHandler.cpp" /Fo"C:\Users\hao.xu\Desktop\Morpheus\Intermediate\Build\Win64\UE4Editor\Development\Morpheus\DJIA3ClientHandler.cpp.obj" /TP /GR- /W4

And I don’t know which flag will cause this problem.

Did you find a solution for your problem? I have the same issue…

You can disable particular cl.exe warnings by adding an entry to WindowsPlatformCompilerSetup.h.

Steve