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 Developer
bjoe
Posts: 8
Registered: ‎03-25-2013
My Device: Blackberry Dev Alpha / Z10
My Carrier: simquadrat.de / sipgate.de

Using C++11 and tr1 extensions

Hi,

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
QMAKE_LFLAGS += -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.

Please use plain text.
Developer
BBSJdev
Posts: 5,986
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
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...

 

http://supportforums.blackberry.com/t5/Native-Development/C-11-Support/m-p/2469643/highlight/true#M4...

 

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. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.