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
Zingam
Posts: 187
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?

Please use plain text.
Contributor
base8
Posts: 26
Registered: ‎06-27-2012
My Device: Playbook
My Carrier: n/a

Re: C++11 mode and qcc?

~nudge~

 

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

Please use plain text.
Developer
Zingam
Posts: 187
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.

Please use plain text.
Developer
trollixx
Posts: 60
Registered: ‎04-18-2012
My Device: BB10 Dev Alpha C
My Carrier: T-Mobile

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
Please use plain text.
Developer
Zingam
Posts: 187
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?

Please use plain text.
Developer
trollixx
Posts: 60
Registered: ‎04-18-2012
My Device: BB10 Dev Alpha C
My Carrier: T-Mobile

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
Please use plain text.
Developer
Zingam
Posts: 187
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.
Please use plain text.
Developer
minmax
Posts: 54
Registered: ‎09-25-2012
My Device: Dev Alpha, Z10
My Carrier: MTS

Re: C++11 mode and qcc?

Hi,
C++11 is still not supported?

Please use plain text.
Developer
Zingam
Posts: 187
Registered: ‎05-09-2012
My Device: Playbook, Z10 LE

Re: C++11 mode and qcc?

There is no STL support for it I think.

Please use plain text.
Contributor
juergen0815
Posts: 30
Registered: ‎02-23-2012
My Device: PlayBook
My Carrier: Bell

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.

Please use plain text.