简体   繁体   English

cc1plus:错误:无法识别的命令行选项“-std=c++0x”

[英]cc1plus: error: unrecognized command line option "-std=c++0x"

I am trying to make using g++ .我试图make使用g++ At first, I upgraded my gcc version by compiling the package locally, and add some environment path to my ~/.bashrc一开始,我通过本地编译包升级了我的gcc版本,并在我的~/.bashrc添加了一些环境路径

alias gcc='/home/rescape/lib/bin/gcc'
alias g++='/home/rescape/lib/bin/g++'
export CC=/home/rescape/lib/bin/gcc
export CPP=/home/rescape/lib/bin/cpp
export CXX=/home/rescape/lib/bin/c++

And I try g++ -v in terminal:我在终端中尝试g++ -v

[rescape@iZ231twjza6Z mxnet]$ g++ -v
Using built-in specs.
COLLECT_GCC=/home/rescape/lib/bin/g++
COLLECT_LTO_WRAPPER=/home/rescape/lib/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --enable-checking=release --enable-languages=c,c++ --disable-multilib --prefix=/home/rescape/lib/
Thread model: posix
gcc version 4.8.0 (GCC) 

Still, When I do make , such error message occurs:尽管如此,当我做make ,会出现这样的错误消息:

[rescape@iZ231twjza6Z mxnet]$ make
g++ -std=c++0x -DMSHADOW_FORCE_STREAM -Wall -O3 -I./mshadow/ -I./dmlc-core/include -fPIC -Iinclude -msse3 -funroll-loops -Wno-unused-parameter -Wno-unknown-pragmas -DMSHADOW_USE_CUDA=0 -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DMXNET_USE_OPENCV=1 `pkg-config --cflags opencv` -fopenmp  -MM -MT build/resource.o src/resource.cc >build/resource.d
cc1plus: error: unrecognized command line option "-std=c++0x"
make: *** [build/resource.o] Error 1

Any suggestions of how to fix this?有关如何解决此问题的任何建议? Thanks!谢谢!

According to this:根据这个:

[rescape@iZ231twjza6Z mxnet]$ make [rescape@iZ231twjza6Z mxnet]$ make

g++ ... g++ ...

You not use CXX variable in your Makefile, so just replace g++ with CXX in your Makefile .你不在你的 Makefile 中使用CXX变量,所以只需在你的Makefile中用CXX替换g++ aliases works only when you enter commands in your shell, if you type g++ something.cpp bash execute /home/bin/g++ something.cpp , that's all, bash aliasing not help if external process (in our case make) execute g++别名仅在您在 shell 中输入命令时才有效,如果您键入g++ something.cpp bash execute /home/bin/g++ something.cpp ,仅此而已,如果外部进程(在我们的示例中为 make)执行g++bash别名将无济于事

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法解析cc1plus:错误:无法识别的命令行选项“ -std = c ++ 11” - Failed to resolve cc1plus: error: unrecognized command line option “-std=c++11” cc1plus:错误:使用g ++无法识别的命令行选项“-std = c ++ 11” - cc1plus: error: unrecognized command line option “-std=c++11” with g++ cc1plus:错误:无法识别的命令行选项“ -std = gnu ++ 11” - cc1plus: error: unrecognized command line option “-std=gnu++11” cc1plus:错误:hxcpp无法识别的命令行选项“ -stdlib = libstdc ++” - cc1plus: error: unrecognized command line option “-stdlib=libstdc++” with hxcpp cc1plus:错误:无法识别的命令行选项“ -Wno-implicit-fallthrough” [-Werror] - cc1plus: error: unrecognized command line option “-Wno-implicit-fallthrough” [-Werror] cc1plus:错误:无法识别的命令行选项“ -fsysroot = <path> ”和g ++ - cc1plus: error: unrecognized command line option “-fsysroot=<path>” with g++ 为什么我得到cc1plus:错误:无法识别的命令行选项“-arch”? - Why do I get cc1plus: error: unrecognized command line option “-arch”? cc1plus.exe:错误:无法识别的命令行选项&#39;-std = c ++ 11&#39;Netbeans 7 - cc1plus.exe: error: unrecognized command line option '-std=c++11' Netbeans 7 cc1plus:对任何其他警告的无法识别的命令行选项警告 - cc1plus: unrecognized command line option warning on any other warning 无法识别的命令行选项-std = c ++ 11或-std = c ++ 0x - Unrecognized command line option -std=c++11 or -std=c++0x
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM