cLion not printing error when crashing
已回答
|
|
I have a weird issue that I just learned about. If I run this code in Visual Studio I get output that is NULL/error. But when I run in cLion I just get app crash and no feedback. VS error :
Here is my config: main.cpp
CMakeList.txt
|
请先登录再写评论。
Null-pointer dereference is an Undefined Behaviour in C++, so different compilers might do different things with it. In your case Visual Studio and GCC are behaving differently, which is expected. Also note that CLion uses an existing compiler (e.g. GCC) instead of bundling a proprietary one (like Visual Studio), so this behaviour is unfortunately out of our control.