error C4577: 'noexcept' used with no exception handling mode specified; terminat

阅读更多

 

getting the following build error when trying to package game:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\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

 

Solved:

 

add the following to your build.cs file:

 

Definitions.Add("BOOST_SYSTEM_NOEXCEPT");

So that Boost will not insert "noexcept" everywhere, that way you don't have to force enable exceptions for all modules.

 

I made it work by editing [ProjectName].Target.cs in the directory above. Adding bForceEnableExceptions = true; there fixed my build so I could use exceptions.

 

What I did was added:

bEnableExceptions =true;

Into the Build file for that module only when building for windows. This fixed the build. 

你可能感兴趣的:(error C4577: 'noexcept' used with no exception handling mode specified; terminat)