【C++】mingw32-make+cmake:error: 'nullptr' was not declared in this scope解决方法

问题

使用cmake成功(Configuring done Generating done)后,在cmd终端中执行
mingw32-make报错:

error: 'nullptr' was not declared in this scope

原因

nullptr是在c++11的新内容。编译时,没有添加对C+11的支持。

解决方法

在Cmake中选择对CXX11的支持。
错误出现后,不用执行任何清除操作,直接在Cmake中选择ENABLE_CXX11,再次点击configure和generating。然后再cmd终端中,再次执行mingw32-make,即可。

这里写图片描述

猜你喜欢

转载自blog.csdn.net/u010168781/article/details/79733323