kstenerud / KSCrash

The Ultimate iOS Crash Reporter
MIT License
4.26k stars 712 forks source link

build with xcode 16 error:no type named 'terminate_handler' in namespace 'std' #567

Closed lishulong199253 closed 2 months ago

lishulong199253 commented 2 months ago

/Users/along/Desktop/companyCode2/GJCrashComponent/GJCrashComponent/Classes/KSCrash/Recording/Monitors/KSCrashMonitor_CPPException.cpp:66:13: error: no type named 'terminate_handler' in namespace 'std' 66 | static std::terminate_handler g_originalTerminateHandler; | ~^ /Users/along/Desktop/companyCode2/GJCrashComponent/GJCrashComponent/Classes/KSCrash/Recording/Monitors/KSCrashMonitor_CPPException.cpp:219:47: error: no member named 'set_terminate' in namespace 'std' 219 | g_originalTerminateHandler = std::set_terminate(CPPExceptionTerminate); | ~^ /Users/along/Desktop/companyCode2/GJCrashComponent/GJCrashComponent/Classes/KSCrash/Recording/Monitors/KSCrashMonitor_CPPException.cpp:223:18: error: no type named 'set_terminate' in namespace 'std' 223 | std::set_terminate(g_originalTerminateHandler); | ~^ 3 errors generated.

lishulong199253 commented 2 months ago

add #include in KSCrashMonitor_CPPException.cpp