Flags (or compiler options) are nothing but ordinary command line arguments passed to the compiler executable.
Assuming you are invoking g++ from the command line (terminal):
$ g++ -std=c++11 your_file.cpp -o your_program
or
$ g++ -std=c++0x your_file.cpp -o your_program
if the above doesn’t work.
Related Posts:
- Compiling C++11 with g++
- error: use of deleted function
- cc1plus: error: unrecognized command line option “-std=c++11” with g++
- What is the difference between g++ and gcc?
- What is a lambda expression in C++11?
- ld: symbol(s) not found for architecture x86_64 error
- What is the ‘override’ keyword in C++ used for? [duplicate]
- What is a smart pointer and when should I use one?
- Meaning of = delete after function declaration
- C++ std::priority_queue uses the lambda expression
- C++ undefined reference to defined function
- Usage and Syntax of std::function
- What exactly is nullptr?
- Difference between `constexpr` and `const`
- Split a string using C++11
- How to create timer events using C++ 11?
- How does #include
work in C++? - Undefined reference to vtable
- What does T&& (double ampersand) mean in C++11?
- make: g++: Command not found
- Segmentation fault error 11 C++
- Undefined reference to vtable
- Why doesn’t C++ have a garbage collector?
- terminate called after throwing an instance of ‘std::invalid_argument’ what(): stoi
- What exactly is std::atomic?
- Issue with std::stol – ‘std::invalid_argument’ what(): stol
- “g++” is not recognized as an internal or external command, MinGW
- terminate called after throwing an instance of ‘std::out_of_range’
- Cleanest way to copy a constant size array in c++11
- push_back vs emplace_back
- undefined reference to ‘std::cout’
- What is move semantics?
- Eclipse C++ : “Program “g++” not found in PATH”
- expression preceding parentheses of apparent call must have (pointer-to-) function type
- C++ error: Undefined symbols for architecture x86_64
- C++ terminate called without an active exception
- Fatal error: iostream: No such file or directory in compiling C program using GCC
- Thread pooling in C++11
- How does std::forward work? [duplicate]
- “g++” is not recognized as an internal or external command, MinGW
- Compiling a C++ program with gcc
- Difference in make_shared and normal shared_ptr in C++
- What is std::move(), and when should it be used?
- Undefined reference to class constructor, including .cpp file fixes
- C++: std does not have member “string”
- push_back vs emplace_back
- gcc/g++: “No such file or directory”
- Undefined reference to constructor
- Call to implicitly deleted copy constructor in LLVM
- expected unqualified-id before string constant
- extra qualification error in C++
- C++ Error ‘nullptr was not declared in this scope’ in Eclipse IDE
- error C2679: binary ‘<<' : no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion)
- no match for ‘operator<<’ in ‘std::operator
- Warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11?
- Use the auto keyword in C++ STL
- Error: free(): invalid next size (fast):
- Call to non-static member function without an object argument compiler error
- Error: free(): invalid next size (fast):
- Does C++11 have C#-style properties?
- I get this error: “glibc detected”
- Update GCC on OSX
- G++ undefined reference to class::function
- Undefined reference to class constructor, including .cpp file fixes
- Iterator Loop vs index loop
- initialize a vector to zeros C++/C++11
- When is it safe to call this-> in constructor and destructor
- How to memset char array with null terminating character?
- How well is Unicode supported in C++11?
- How to automatically convert strongly typed enum into int?
- Difference between
and - Why should I use a pointer rather than the object itself?
- too many initializers for ‘int [0]’ c++
- Getting a bunch of crosses initialization error
- overloaded function with no contextual type information
- Creating folders in C++
- Expected unqualified-id before ‘[‘ token
- convert string to size_t
- Fatal error: iostream: No such file or directory in compiling C program using GCC
- What does “-Wall” in “g++ -Wall test.cpp -o test” do?
- What is a .h.gch file?
- ERROR C2039: ‘vector’: is not a member of ‘std’
- Does static constexpr variable inside a function make sense?
- c++ vector bubble sort
- Update g++ but still old version
- Link error “undefined reference to `__gxx_personality_v0′” and g++ [duplicate]
- How to use bitmask?
- Differences between unique_ptr and shared_ptr
- What does int argc, char *argv[] mean?
- Using NULL in C++?
- Press Enter to Continue
- How to trim a std::string?
- How do I add the MinGW bin directory to my system path?
- Reading from .txt file into two dimensional array in c++
- C++ Simple hangman game
- Reading data from file into an array
- LINK : fatal error LNK1561: entry point must be defined ERROR IN VC++
- Using G++ to compile multiple .cpp and .h files
- LPCSTR, LPCTSTR and LPTSTR
- C++ equivalent of StringBuffer/StringBuilder?