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
Posts: 3
Registered: ‎11-01-2013
My Device: BlackBerry Z10
My Carrier: TIM

Guidance for a newcomer

Hello,

 

I've just bought a Z10 and, having some passion for C++, Qt and programming in general, I decided to join the dev community and setup IDEs, SDKs and so on.

 

I've been reading stuff all day long, and I have some confusion in my head. So, what I would like to receive issome clarifications regarding BB10 SDK and C++11: is it correct that qcc (it's the name of the customized C++ compiler for BB, right?) is based on gcc 4.6.3? If so, C++11 support isn't very extended...and since I have most of my code written in C++11, I wonder: are there any plans to update qcc to be based on GCC 4.8 or so?

 

Another thing: does the compiler support the Standard Library and STL in their entireness?

 

Thanks in advance,

 

Andrea

Developer
Posts: 271
Registered: ‎05-29-2013
My Device: BlackBerry Z10
My Carrier: MTS

Re: Guidance for a newcomer

Welcome to the forums Smiley Happy

Actually qcc is a wrapper around gcc. So is is a gcc somewhat of 4.6.

-------------------------------------------------------------------------------
NSR Reader for BlackBerry 10 @NSRReader on Twitter
Me @xelfium on Twitter
New Contributor
Posts: 3
Registered: ‎11-01-2013
My Device: BlackBerry Z10
My Carrier: TIM

Re: Guidance for a newcomer

Thanks.
Anyway, my question still stands, since I can't certainly wrap gcc 4.8 on my own and inject it into the sdk...
I'd really rather avoid reverting many lines of code to C++03, I mean, how can you code without unique_ptr and r value references once you got used to it?

Has any rim employee any insight on this matter? I tried using qt creator instead of momentics but the problem remains as qt creator uses qcc...
Developer
Posts: 1,168
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Re: Guidance for a newcomer

[ Edited ]

Yes, it would be nice if qcc used a more recent version of gcc, but why not just duplicate unique_ptr yourself? It is just a class, a template, and some helper functions. The details are here.

 

Alternately, depending on exactly how you use unique_ptr, you could use auto_ptr instead.

 

Finally, although it provides different functionality, with the way objects are used with Qt, QPointer is likely to be more useful than unique_ptr.


Etchelon wrote:
Thanks.
Anyway, my question still stands, since I can't certainly wrap gcc 4.8 on my own and inject it into the sdk...
I'd really rather avoid reverting many lines of code to C++03, I mean, how can you code without unique_ptr and r value references once you got used to it?

Has any rim employee any insight on this matter? I tried using qt creator instead of momentics but the problem remains as qt creator uses qcc...





Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.  multiFEED Icon

Play nice: Clicking Like Button on posts that helped you not only encourages others to continue sharing their experience, but also improves your own rating on this board. Also, don't forget to accept a post if it solves your problem or answers your question.
Highlighted
New Contributor
Posts: 3
Registered: ‎11-01-2013
My Device: BlackBerry Z10
My Carrier: TIM

Re: Guidance for a newcomer

Thanks. The point is that I don't want to rewrite my code, and I also prefer to have it use stl containers rather than Qt classes for portability (I know that Qt is portable, but not on Windows Phone) as much as possible in my code. Nonetheless I will do as u suggest if there's no better solution.

One more thing: using Qt Creator, which I greatly prefer over Eclipse, I am not able to include standard headers like <string>, maybe because qcc is found in the folder BBNDK/host/...etc whereas headers are in target/.../include/c++
Can anyone using Qt Creator suggest a solution? I'm still a bit unsure on how to manually reference headers in my programs, I'm used to Visual Studio which does everything on his own, whereas Qt Creator is more linux-like in that it requires manual intervention...

Thanks in advance