C++11 Support

General questions regarding the usage of CodeLite
elkvis
CodeLite Enthusiast
Posts: 18
Joined: Wed Jul 21, 2010 5:17 pm
Genuine User: Yes
IDE Question: C++
Contact:

C++11 Support

Post by elkvis »

What is the official status of C++11 support? A search of the forum turned up nothing. I use C++11 features quite extensively on Linux, and I'd like to see support for things like range-based for loops and lambda functions.
petah
CodeLite Expert
Posts: 231
Joined: Sat Nov 24, 2012 8:04 pm
Genuine User: Yes
IDE Question: c++
Location: Los Angeles
Contact:

Re: C++11 Support

Post by petah »

I've used various C++11 features in programs I write with CL, what exactly is your problem?

Btw Codelite's an IDE, not a compiler, so other than for code parsing you need to look at your compiler flags.

cheers,

-- p
main: Debian Jessie x64 + custom wxTrunk
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: C++11 Support

Post by eranif »

elkvis wrote:What is the official status of C++11 support?
There are 2 ways that codelite supports C++11:

- code completion
- indentation

The first 'code completion' is supported as far as clang can handle it (and it does it pretty well) - here is how to configure clang to work with codelite - note you don't need to install anything just simple configuration

The later - it is supported, unless you see a bug - so please report it when you encounter it

Eran
Make sure you have read the HOW TO POST thread
elkvis
CodeLite Enthusiast
Posts: 18
Joined: Wed Jul 21, 2010 5:17 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: C++11 Support

Post by elkvis »

petah wrote:Btw Codelite's an IDE, not a compiler, so other than for code parsing you need to look at your compiler flags.
my compiler flags are fine.

One thing that appears to be missing is support for raw string literals R"()"
raw string literals are incredibly useful for database queries.

I tried enabling clang for code completion, but it gives me errors like "'stdarg.h' not found"
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: C++11 Support

Post by eranif »

Did u perform a full rebuild after enabling clang?
Make sure you have read the HOW TO POST thread
elkvis
CodeLite Enthusiast
Posts: 18
Joined: Wed Jul 21, 2010 5:17 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: C++11 Support

Post by elkvis »

eranif wrote:Did u perform a full rebuild after enabling clang?
yes. I googled the error, and tried rebuilding my list of include paths, and now I get errors about __float128 being undefined, and that seems to be a bug in clang, from what I've read in my googling. on top of that, the code completion takes more than ten times as long to do its job. I'll probably just stick to the normal code completion, because it actually works.
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: C++11 Support

Post by eranif »

This is strange as clang is working very well for me on Linux. The code completion is close to instant on large projects
Anyway if u encounter any problem with the current code completion (the built in engine) make sure to report it.

Eran
Make sure you have read the HOW TO POST thread
elkvis
CodeLite Enthusiast
Posts: 18
Joined: Wed Jul 21, 2010 5:17 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: C++11 Support

Post by elkvis »

apart from not recognizing lambdas and range-based for loops, it works just fine.

I'm running ubuntu 12.10 x64, using gcc 4.7.2 and the standard clang3.0/llvm3.0 packages with codelite 5.2, pulled from the git repository yesterday afternoon.
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: C++11 Support

Post by eranif »

elkvis wrote:and the standard clang3.0/llvm3.0 packages
You might have installed them, but codelite does not use them, actually it uses its own libclang.so

Eran
Make sure you have read the HOW TO POST thread
elkvis
CodeLite Enthusiast
Posts: 18
Joined: Wed Jul 21, 2010 5:17 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: C++11 Support

Post by elkvis »

I can't remember what I changed, but now I'm no longer getting that __float128 error, and I'm getting a new error. unfortunately, I can't copy and paste the error message. is there a log file where I can find clang errors?
Post Reply