There is an other solution that also gets rid of any errors inside the code:
go to CLion Settings > Build,Execustion,Deployment -> Toolchain
and there change the settings from MonGW to VisualStudio
. Change Architecture
to be amd64
and set Make
, C Compiler
and C++ Compiler
to Let CMake Detect
then Apply. In the CMake
section change Build type:
to Release
. Apply and close settings and everything should work as expected.