g++でのc++11のコンパイルについて
Posted: 2013年11月13日(水) 19:24
仮想マシン VMware Player6.0.1
ホストOS Windows7
ゲストOS Ubuntu12.04
gcc version 4.8.1 (Ubuntu 4.8.1-2ubuntu1~12.04)
c++11で導入されたarrayなどのSTLをincludeしてコンパイルした際に、
must be enabled with the -std=c++11 or -std=gnu++11 compiler options
と怒られたので、
$ g++ -std=c++11 hoge.cpp
としたところ、
g++: fatal error: no input files
compilation terminated.
と言われてしまいました。
それ以外のプログラムは正常にコンパイルできます。
g++でc++11をコンパイルするにはどうすればいいのでしょうか?
ホストOS Windows7
ゲストOS Ubuntu12.04
gcc version 4.8.1 (Ubuntu 4.8.1-2ubuntu1~12.04)
c++11で導入されたarrayなどのSTLをincludeしてコンパイルした際に、
must be enabled with the -std=c++11 or -std=gnu++11 compiler options
と怒られたので、
$ g++ -std=c++11 hoge.cpp
としたところ、
g++: fatal error: no input files
compilation terminated.
と言われてしまいました。
それ以外のプログラムは正常にコンパイルできます。
g++でc++11をコンパイルするにはどうすればいいのでしょうか?