Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Compiler flags(Dialect flag)
Compiler flags [message #1829492] Sun, 05 July 2020 10:05 Go to next message
Bogdan Shevchenko is currently offline Bogdan ShevchenkoFriend
Messages: 1
Registered: July 2020
Junior Member
Hello
I installed eclipse ide 2020 and trying to set dialect flag
My test code
int main() {
  std::cout << __cplusplus << std::endl;
  return 0;
}


If I use terminal command $ g++ -std=c++1z -Wall -o hello 2_w_1_t_1.cpp
index.php/fa/38495/0/
Output is 201703 . It's what i am waiting
But if I try to set -std=c++1z flag in Eclipse IDE Settings this flag don't work.
C/C++ -> Build -> Settings -> GCC Built-in Compiller Settings
${COMMAND} ${FLAGS} -std=c++1z -E -P -v -dD "${INPUTS}"
I have 201402 not 201703

Please tell what I am doing wrong
  • Attachment: test.png
    (Size: 20.64KB, Downloaded 3929 times)
Re: Compiler flags [message #1829511 is a reply to message #1829492] Mon, 06 July 2020 04:37 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Set the Allocate Console in the Builtin Compiler Settings provider
index.php/fa/38503/0/
You should be able to see the command being executed
index.php/fa/38504/0/

Understand that this only affects the Indexer.
To create makefiles with -std=c++1z you need to set it in
Project --> C/C+ Build --> Settings --> Tool Settings tab --> <c++ compiler> --> Dialect
It's not a standard setting so you will probably have to use the Other dialect flags edit box
This will then use the dialect in compiles.

[Updated on: Mon, 06 July 2020 04:49]

Report message to a moderator

Previous Topic:ISO C++ 2020 syntax fails to parse correctly
Next Topic:What is the meaning of the icons in a C/C++ project
Goto Forum:
  


Current Time: Thu Apr 18 13:09:20 GMT 2024

Powered by FUDForum. Page generated in 0.01431 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top