Question

I am using CodeLite 5.1 on Ubuntu QQ. By default, based on what was intalled previously with QQ and other tools, I have the gtCC and gt++ toolchains avialable. I always use gt++, which seems to get along OK with Boost.

Would like to get things running using C++ 11 - what steps do I need to take? Do I need to install C++ 11 libs?

Was it helpful?

Solution

Update See below

I tried on Linux1:

First, under build options, create an entry for the relevant compiler switch:

enter image description here

Zoomed:

enter image description here

Demonstration using g++:

  1. Create project

enter image description here

  1. Set build flags (Global Settings)

enter image description here

  1. Build and run

enter image description here

SUCCESS!

Update:

You will likely want to tick the Enable C++11 Standard checkbox under "Code Completion" too:

enter image description here


1 On Ubuntu Quantal, don't use the distro version - it crashes on opening a project. Use

deb http://repos.codelite.org/ubuntu/ quantal universe

OTHER TIPS

You need to supply a -std=c++11 (or similar) command to the compiler you are using. Consult the documentation of your compiler of choice.

Unless you current code is subject to breaking changes that were introduced with C++11, your current code will continue to run "as is". Verify that all your test continue to run, and then you are all set to start using the new features that your compiler supports. Since C++11 support is very much in flux, you might have to upgrade your compiler to its lastest version.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top