View Full Version : How to adjust compiler settings
spacerocket
June 20th, 2014, 06:18 PM
Hello,
My current compiler (g++) doesn`t allow to compile C++11....
Any idea about how could I change the settings for it to follow the C++11 standard?
ofnuts
June 20th, 2014, 08:45 PM
If you compiler doesn't allow it, then a setting won't change that, unless you didn't even try "man g++".
Otherwise, see http://gcc.gnu.org/projects/cxx0x.html and compaere with the relase of GCC on your system. Maybe you need to upgrade.
QIII
June 20th, 2014, 08:56 PM
I think, but I don't remember, that I looked for C++11 in synaptic, added it and just added a flag to the path -- but I did that in my IDE setup. Not at home right now to look.
I think from the terminal the basic syntax would be
g++ -std=c++11 your_file.cpp -o your_program
plus whatever other flags you'd normally use.
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.