Language : C++
OS : Windows 7/10
I use a third party library that calls the system method exit() which quits the application. How can I override that behavior so that instead of the system exit(), some other method is called, for example I can provide a different implementation that throws an exception.
I have seen some solutions asking to directly provide my own implementation of exit, but that results in the following error:
MSVCRTD.lib(MSVCR120D.dll) : error LNK2005: exit already defined in main.obj debug\Sample.exe : fatal error LNK1169: one or more multiply defined symbols found