Clion compilation error: nullptr not declared in the scope

Problem: Compile a C++ program with clion, an error occurs: nullptr not declared in the scope

Error lookup:

1. Check if CMakeLists is CMAKE_CXX_STANDARD 11

It is found that it is set like this, no problem

2. Check the version of MinGW in the settings of Clion, and find that the version is too low, so it does not support the new features of C++ 11

solve:

Re-download the higher version of MinGW, and re-select the higher version of MinGW in setting->Build,Execution,Deployment->Toolchains


Recompile, error resolved

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325518033&siteId=291194637