Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Unable to get Kepler working with c++11(Build is ok but IDE doesn't understand c++11)
Unable to get Kepler working with c++11 [message #1387144] Tue, 24 June 2014 11:53 Go to next message
Matteo Naccari is currently offline Matteo NaccariFriend
Messages: 1
Registered: June 2014
Junior Member
Hello everyone,

I have an existing code written in c++11 which has been imported in CDT Kepler as a c++ project (.cproject file originally shipped with the code). I've got already a make file for this so I'm able to build everything but I end up with many errors in the IDE (e.g. symbol shared_ptr could not be resolved, etc.). I guess this is due to CDT being misconfigured for c++11. I tried to follow the instructions posted here but under Build -> Settings there is no Tool Settings tab. Did anyone have the same problem? I'm not able to specify this option even if I import the files using EGit nor by selecting an existing c++ project...

Many thanks for your kind reply!
Re: Unable to get Kepler working with c++11 [message #1387575 is a reply to message #1387144] Wed, 25 June 2014 09:25 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
https://www.eclipse.org/forums/index.php/mv/msg/373462/909018/#msg_909018

Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Unable to get Kepler working with c++11 [message #1389764 is a reply to message #1387144] Sat, 28 June 2014 09:22 Go to previous messageGo to next message
Thies Thate is currently offline Thies ThateFriend
Messages: 2
Registered: June 2014
Junior Member
I put this already as message #1386960 Perhaps here more chance?

As c++11 beginner I follow some Stroustrup C++ exercises.
(Programming 2nd edition, using his std_lib_facilities.h)

Each exercise has to be setup as a new project.
Up to now I have to add -std=c++11 via Project/Properties/C/C++ Build/Settings/
GCC C++ Compiler/Miscellaneous, this works.

My question: how can I arrange this for the workspace, so that it is no more necessary
to add -std=c++11 for each project?

I tried this via window/preferences/ c/c++ /Build/Settings/Discovery/CDT GCC Built-in
Compiler Settings [Shared] (Command to get compiler specs:added there -std=c++11) but without effect.

Thanks for your help.

(Eclipse's CDT FAQ did not help in this, as far as I can see.)

See attached screenshots:
settings.png: Here the warning:"These settings are global to the entire workspace. They are overridden by project-specific settings."
settings1.png: you see under other flags no -std=c++11. So if that is not added here the settings for the workspace are overridden and no -std=c++11 is used.
settings2.png: I added the needed -std=c++11 and now everything works fine for c++11.

Again my question how can I set things right once for the workspace so that I do not have to add it again for each project?

===

  • Attachment: settings.png
    (Size: 158.06KB, Downloaded 378 times)
  • Attachment: settings1.png
    (Size: 135.75KB, Downloaded 350 times)
  • Attachment: settings2.png
    (Size: 139.37KB, Downloaded 366 times)
Re: Unable to get Kepler working with c++11 [message #1445013 is a reply to message #1389764] Tue, 14 October 2014 22:36 Go to previous message
KJC Wientjes is currently offline KJC WientjesFriend
Messages: 1
Registered: October 2014
Junior Member
As suggested on other forums there is a workaround:

Project Properties -> C/C++ General -> Preprocessor Include Paths, Macros->[Providers] tab -> your Built-in Compiler Settings provider (toolchain dependent) -> There is "Command to get compiler specs" input field, add "-std=c++0x" in there.

KJW
Previous Topic:Can't configure Indexer to recognize "forced-included" files (/fi parameter)
Next Topic:Basic built in includes missing after updating OSX
Goto Forum:
  


Current Time: Fri Oct 04 02:46:31 GMT 2024

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

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

Back to the top