I have written code in C++ and compiled it by typing make
. There is an error in the line #include <random>
which is:
/usr/include/c++/4.8/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
Please explain the error and how to correct it. I am working in Ubuntu 14.04 and coding in C++. I did type in make -std=c++11
But got this error message. make: invalid option -- '=' make: invalid option -- 'c' make: invalid option -- '+' make: invalid option -- '+' make: invalid option -- '1' make: invalid option -- '1' Usage: make [options] [target] ...
The content of my MakeFile created by using the command cmake ..
is as follows: `# CMAKE generated file: DO NOT EDIT!
Generated by "Unix Makefiles" Generator, CMake Version 2.8
Default target executed when no arguments are given to make.
default_target: all .PHONY : default_target
=============================================================================
Special targets provided by cmake.
Disable implicit rules so canonical targets will work.
.SUFFIXES:
Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
Suppress display of executed commands.
$(VERBOSE).SILENT:
A target that is always out of date.
cmake_force: .PHONY : cmake_force
=============================================================================
Set environment variables for the build.
The shell in which to execute make rules.
SHELL = /bin/sh
The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
The command to remove a file.
RM = /usr/bin/cmake -E remove -f
Escaping for special characters.
EQUALS = =
The program to use to edit the cache.
CMAKE_EDIT_COMMAND = /usr/bin/ccmake ` And so on...
Aucun commentaire:
Enregistrer un commentaire