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

New Developer
Posts: 8
Registered: ‎03-25-2013
My Device: Blackberry Z10 / Z30 / Playbook
My Carrier: simquadrat.de / sipgate.de

Using C++11 and tr1 extensions


I developed a library on my linux host and use the new great :-) C++11 feature (for an example move semantic, lambda, std::function, std::unique_ptr etc.).

I want to porting the library to my blackberry device.
By default qcc uses the Dinkumware C++ library (libcpp.so.4) which does not have C++11/tr1 support.
Under bbndk/target_10_2_0_1155/qnx6/usr/include/c++/4.6.3/... I found the tr1 headers. With the qcc's -Y_gpp option, qcc will add the include path and link the binary against GNU C++ library (libstdc++.so.6). The library is also installed on the BlackBerry device under /lib.
Great :-), so I add in my *.pro file following lines:

QMAKE_CXXFLAGS += -Wc,-std=c++0x -Y_gpp

Compiling and linking works well :-), but every time when I execute my project on my device they crashed with SIGSEV :-(. With the debugger, I see the system loads the libstdc++.so.6 as shared library.

I think the problem is that the BlackBerry Cascade is compiled with the Dinkum C++ library? So I can't "mixing" the libraries?

Does anybody knows, if there is C++11 and/or C++14 :-)  support on BlackBerry in the future? I see on QNX there is a new gcc version 4.8.1 available.

Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Using C++11 and tr1 extensions

This has been asked and answered a few times before, please do a search before posting.


Any way here's one thread that got responded to by someone from BlackBerry...




Do a search for C++ 11 if you want to read the rest.

If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Posts: 35
Registered: ‎10-15-2013
My Device: BlackBerry Z30
My Carrier: O2 UK

Re: Using C++11 and tr1 extensions

bjoe - You are correct in saying that you cannot mix the Dinkumware (libcpp.so.4) library with the GNU Std C++ library (libstdc++.so).

More details about C++11 here: http://supportforums.blackberry.com/t5/Native-Development/C-11-and-BlackBerry-10/m-p/2985632