[C++] mingw32-make+cmake: error: 'nullptr' was not declared in this scopeSolution

question

After using cmake successfully (Configuring done Generating done), execute
mingw32-make in the cmd terminal and report an error:

error: 'nullptr' was not declared in this scope

reason

nullptr is new in c++11. When compiled, no support for C+11 was added.

Solution

Select support for CXX11 in Cmake.
After the error occurs, without performing any clearing operations, directly select ENABLE_CXX11 in Cmake, and click configure and generate again. Then in the cmd terminal, execute mingw32-make again, you can.

write picture description here

Guess you like

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