Error executing cl.exe (tool returned code: 2)


Xoreax Grid Engine Console 8.01 (build 1867)
Copyright (C) 2001-2017 Xoreax Software Ltd. All rights reserved.
-----------------------------------------------------------------


--------------------Build System Warning---------------------------------------
License is invalid:
    License information is invalid. Please try reloading your license file using the Coordinator Monitor application on the Coordinator machine, or reinstall IncrediBuild.
    This build will run in standalone mode.

-------------------------------------------------------------------------------
--------------------Project: Env_0---------------------------------------------
** For Fps_Strong-Win64-Development
Module.WmfMedia.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\INCLUDE\vcruntime_new.h(67): error C4577: 'noexcept' used with no exception handling mode specified; termination on exception is not guaranteed. Specify /EHsc

Error executing C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX64\x64\cl.exe (tool returned code: 2)
Fps_Strong-PhysXVehicles.lib
Fps_Strong-OculusHMD.lib
Fps_Strong-ProceduralMeshComponent.lib
Fps_Strong-SteamVR.lib
Fps_Strong-MobilePatchingUtils.lib
Fps_Strong-Paper2D.lib
Fps_Strong-LocationServicesBPLibrary.lib
Fps_Strong-AppleARKit.lib
Fps_Strong-OnlineSubsystem.lib
Fps_Strong-ActorSequence.lib
Fps_Strong-UdpMessaging.lib
Fps_Strong-ArchVisCharacter.lib
Fps_Strong-TcpMessaging.lib
Fps_Strong-WmfMediaFactory.lib
Fps_Strong-SteamVRController.lib
Fps_Strong-CableComponent.lib
Fps_Strong-MediaCompositing.lib
Fps_Strong-OpenExrWrapper.lib
Fps_Strong-CustomMeshComponent.lib
Fps_Strong-ImgMediaFactory.lib
Fps_Strong-ImgMedia.lib
Fps_Strong-AvfMediaFactory.lib
Fps_Strong-HTML5Networking.lib
Fps_Strong-ImmediatePhysics.lib
Fps_Strong-FacialAnimation.lib
Fps_Strong-LightPropagationVolumeRuntime.lib
Fps_Strong-AndroidPermission.lib
Fps_Strong-OnlineSubsystemUtils.lib
Fps_Strong-WindowsMoviePlayer.lib
Fps_Strong-OculusInput.lib
Fps_Strong-CharacterAI.lib
Fps_Strong-ExampleDeviceProfileSelector.lib
Fps_Strong-OnlineSubsystemNull.lib
Fps_Strong-RuntimePhysXCooking.lib
** For BootstrapPackagedGame-Win64-Shipping
BootstrapPackagedGame-Win64-Shipping.exe
---------------------- Done ----------------------
 
    Rebuild All: 0 succeeded, 1 failed, 0 skipped
 
1 build system warning(s):
   - License is invalid

I get the same error at the same line of vcruntime_new.h when trying to build my project or UE4 itself. Àny chance you’ve solved this already? Solutions I’ve found are all based on editing the Build.cs, which didn’t seem to work for me.

EDIT: A little more information: I’m on 4.16 and Visual Studio 2017. Everything compiled fine a few weeks ago and I’m pretty sure I haven’t done any codework in between, just blueprints. However, I’m on a new hardware setup now.

For me, this was just VS2017 being silly - I uninstalled all packages in the Visual Studio Installer and re-installed the following ones:

  • The .NET desktop package
  • The C++ desktop package
  • The C++ game development package
  • Windows 8.1 SDK and UCRT SDK (I think that had to be chosen manually)

I then compiled the engine alone without the project, then the project. The error is gone.

Hi - maybe this will help someone else.
This code came up for me and tearing my hair out.
Ended up being my int i = 0; was not initialised in my forloop. i.e. i have ‘for(int i; i< bla; i++)’ missing the first declaration. No idea why Visual Studio did not flag this up. Stupid mistake by me, but hopefully this will point you in a possible direction.

I think you had installed the IncrediBuild just like me and did not regist it. To slove this problem you just need unload IncrediBuild or regist it.

1 Like