Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Contributor
samir22
Posts: 8
Registered: ‎02-05-2013
My Device: Dev Alpha

Re: C++11 mode and qcc?

Hey,

 

Did you manage to solve this problem? I'm stuck at a similar point in my project.

Developer
guru2000at
Posts: 101
Registered: ‎02-25-2011
My Device: Playbook, q5, z10

Re: C++11 mode and qcc?

Is there any solution for it ?

 

________________
mappau Dev Team
blackberry@mappau.com
twitter: mappau
Developer
Zingam
Posts: 195
Registered: ‎05-09-2012
My Device: Playbook, Z10 LE

Re: C++11 mode and qcc?

The solution would be lots of noisy developers to display interested in immediate C++ 11 support. Then Blackberry might decide to be nice and to enable proper support. :smileywink: I am serious!

 

One of the lead platform developers wrote a month or so ago that currently qcc doesn't support C++11 or something like that. Go and vote/file a request for C++11 support.

Developer
indy2718
Posts: 36
Registered: ‎01-16-2013
My Device: Z10

Re: C++11 mode and qcc?

It's possible to use some of it (lambdas, auto, raw strings), although I don't know how safe.  Seems okay for me.  Use at your own risk:

Under compiler options, add:  -std=c++0x

Under Preprocessor Options, use:  -U__GXX_EXPERIMENTAL_CXX0X__

This is so that any external headers you include don't use glib's special constructors for the stl.

 

I then made my own unique_ptr and move, forward.

 

I think the main problem with the c++0x and QNX is that QNX uses it's own STL (possibibly a modified Dinkum).

Developer
Zingam
Posts: 195
Registered: ‎05-09-2012
My Device: Playbook, Z10 LE

Re: C++11 mode and qcc?

But don't try to use this with Qt... 

Developer
trollixx
Posts: 60
Registered: ‎04-18-2012
My Device: BB10 Dev Alpha C

Re: C++11 mode and qcc?

I use some С++11 features (mostly lambdas) with Qt5 without any problems.

--
Oleg Shparber
Developer
Zingam
Posts: 195
Registered: ‎05-09-2012
My Device: Playbook, Z10 LE

Re: C++11 mode and qcc?

I don't know about Qt5 but as I've written above one of the developers commented that it is disabled for the NDK. You can find that in bugreports.qt-project.org if you are interested. Do you use Linux or Windows?

 

BTW What is the status of Qt 5 currently? Is it OK to start a graphics intensive project (with or without using C++11) and hope to finish/publish it in few months?

Developer
trollixx
Posts: 60
Registered: ‎04-18-2012
My Device: BB10 Dev Alpha C

Re: C++11 mode and qcc?

I'm quite happy with Qt5 (though nothing in the bb world published yet). Its performance is much better than Qt4 (not Cascades). You need to bundle all libs, resulting bar is 9-10 MB.
--
Oleg Shparber
Developer
Zingam
Posts: 195
Registered: ‎05-09-2012
My Device: Playbook, Z10 LE

Re: C++11 mode and qcc?

[ Edited ]

And you are developing on Linux? (this is the link to the issue I've written above - the last post https://bugreports.qt-project.org/browse/QTBUG-28954)

Developer
trollixx
Posts: 60
Registered: ‎04-18-2012
My Device: BB10 Dev Alpha C

Re: C++11 mode and qcc?

Yes, I am on Linux. And I have never tried using C++11 with Qt4.

--
Oleg Shparber