cc1plus.exe:错误:无法识别的命令行选项'-std = c ++ 11'Netbeans 7

时间:2013-08-05 13:17:13

标签: c++ c++11 netbeans-7

我正在尝试在Netbeans 7.3中设置C ++ 11,但是我似乎已经碰壁了。我得到的错误与标题中的错误相同:

cc1plus.exe: error: unrecognized command line option '-std=c++11'

我已经安装了G ++ 4.7.1(它应该支持C ++ 11)并遵循此主题的说明:

Why doesn't Netbeans recognize `cbegin()`, `cend()`, `unordered_set`, among other C++ features?

这是控制台转储:

"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .clean-conf
make.exe[1]: Entering directory `/c/Users/Nikola/Documents/NetBeansProjects/heap'
rm -f -r build/Debug
rm -f dist/Debug/MinGW_11-Windows/heap.exe
make.exe[1]: Leaving directory `/c/Users/Nikola/Documents/NetBeansProjects/heap'


CLEAN SUCCESSFUL (total time: 654ms)

"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/c/Users/Nikola/Documents/NetBeansProjects/heap'
"/C/MinGW/msys/1.0/bin/make.exe"  -f nbproject/Makefile-Debug.mk dist/Debug/MinGW_11-Windows/heap.exe
make.exe[2]: Entering directory `/c/Users/Nikola/Documents/NetBeansProjects/heap'
mkdir -p build/Debug/MinGW_11-Windows
rm -f build/Debug/MinGW_11-Windows/main.o.d
g++    -c -g -std=c++11 -MMD -MP -MF build/Debug/MinGW_11-Windows/main.o.d -o build/Debug/MinGW_11-Windows/main.o main.cpp
cc1plus.exe: error: unrecognized command line option '-std=c++11'
make.exe[2]: *** [build/Debug/MinGW_11-Windows/main.o] Error 1
make.exe[2]: Leaving directory `/c/Users/Nikola/Documents/NetBeansProjects/heap'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/c/Users/Nikola/Documents/NetBeansProjects/heap'
make.exe": *** [.build-impl] Error 2


BUILD FAILED (exit value 2, total time: 1s)

顺便说一句,我在Windows上运行Netbeans。

1 个答案:

答案 0 :(得分:0)

-std=c++11更改为-std=c++0x