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
Developer
Posts: 195
Registered: ‎05-09-2012
My Device: Playbook, Z10 LE

C++11 mode and qcc?

Does the QNX compiler support any C++11? I mean I have tried these two options:

-std=c++0x and -std=gnu++0x but I couldn't get it to work?

 

Are they supported and if they are, where should I exactly put them in Momentics?

Contributor
Posts: 26
Registered: ‎06-27-2012
My Device: Playbook

Re: C++11 mode and qcc?

~nudge~

 

I would like to know the answer to this as well.

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

Re: C++11 mode and qcc?

My research shows that it doesn't. What a shame. I hope they would upgrade qcc to version 4.7 and enable C++11 some day.

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

Re: C++11 mode and qcc?

Anyone has success with 10.0.6 version of SDK? It has all the headers and gcc 4.6.3 and I added:

    INCLUDEPATH += $$(QNX_TARGET)/usr/include/c++/4.6.3
    INCLUDEPATH += $$(QNX_TARGET)/usr/include/c++/4.6.3/arm-unknown-nto-qnx8.0.0eabi
    QMAKE_CXXFLAGS += -Wc,-std=c++0x

to my .pro file, but anyway I get the following error during build:

opt/bbndk-10.0.6/target_10_0_6_384/qnx6/usr/include/c++/4.6.3/bits/stl_relops.:68: Parse error at "std"

 

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

Re: C++11 mode and qcc?

Seriously? They have updated the compiler? But why not version 4.7. Well, if I am not mistaken, Qt5 requires newer gcc. But qcc lacks the option to enable C++11. Has that changed now?

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

Re: C++11 mode and qcc?

SDK 10.0.6 contains GCC 4.6.3, To enable some of C++11 features through qcc wrapper use -Wc,-std=c++0x parameter. I've successfully compiled some lambda stuff, etc, but got stuck with STL headers. :smileysad:

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

Re: C++11 mode and qcc?

Report a bug?

Would it mean that it is safe to assume I could use C++11? I'm about to start developing a little opengl demo but I only have a playbook and I hate the emulator, so I don't use the bb10 sdk yet. And hope they'll deliver bb10 for playbook on time by the time I am done.
Developer
Posts: 54
Registered: ‎09-25-2012
My Device: Dev Alpha, Z10

Re: C++11 mode and qcc?

Hi,
C++11 is still not supported?

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

Re: C++11 mode and qcc?

There is no STL support for it I think.

Contributor
Posts: 30
Registered: ‎02-23-2012
My Device: PlayBook

Re: C++11 mode and qcc?

The gcc 4.4.2 in the BB2.1 SDK supports -Wc,-std=c++0x as well, but you'll run into the same troubles as mentioned above with the BB10 SDK. It almost feels that the std=c++0x is simply ignored.