[英]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.