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
ahsan_iqbal
Posts: 26
Registered: ‎04-11-2012
My Carrier: BlackBerry

Code compilation issue on NDK BB10_0_06

Hi Guys

 

I am working on a game that is being compiled successfully on NDK for tablet OS 2.0.0, When I tried to compile that game for blackberry 10 I got errors in "target_10_0_6_384/qnx6/usr/include/cpp/xmemory" and errors are 

 

 const value_type* std::allocator<_Ty>::address(std::allocator<_Ty>::const_reference) const 

 

strange thing is same code is being compiled for tablet os, Is there some error/bug in ndk for blackberry 10. Can anybody guide me how to solve this issue.

 

Regards

Ahsan

Please use plain text.
BlackBerry Development Advisor (Retired)
smacmartin
Posts: 499
Registered: ‎05-07-2012
My Carrier: developer

Re: Code compilation issue on NDK BB10_0_06

[ Edited ]

What's the full error?

Are there earlier errors in thebuild log?

 

Stuart

Please use plain text.
New Contributor
raza_shah
Posts: 3
Registered: ‎08-09-2012
My Carrier: blackberry 10

Re: Code compilation issue on NDK BB10_0_06

[ Edited ]

Guys

 

Here is the actual error that occured (in regards to Ahsan's post) :

 

../target_10_0_6_384/qnx6/usr/include/cpp/xmemory:115:16: error: 'const value_type* std::allocator<_Ty>::address(std::allocator<_Ty>::const_reference)
const [with _Ty = const MyNameSpace::AsciiString, std::allocator<_Ty>::const_pointer =
const MyNameSpace::AsciiString*, std::allocator<_Ty>::value_type = const MyNameSpace::AsciiString, std::allocator<_Ty>::const_reference = const MyNameSpace::AsciiString&]'
cannot be overloaded

 

../target_10_0_6_384/qnx6/usr/include/cpp/xmemory:110:10: error: with 'std::allocator<_Ty>::value_type* std::allocator<_Ty>::address(std::allocator<_Ty>::reference)
const [with _Ty = const MyNameSpace::AsciiString, std::allocator<_Ty>:: pointer = const MyNameSpace::AsciiString*, std::allocator<_Ty>::value_type =
const MyNameSpace::AsciiString, std::allocator<_Ty>::reference = const MyNameSpace::AsciiString&]'

cc: ../host_10_0_6_1/win32/x86/usr/lib/gcc/arm-unknown-nto-qnx8.0.0eabi/4.6.3/cc1plus caught signal 1
Build error occurred, build is stopped

 

 

Also, just to reiterate, the same game is running fine on BB Playbook but this compilation error comes when running on native SDK for BB 10.

 

Any help or hint would be appreciated.

 

Thanks

Raza

Please use plain text.
BlackBerry Development Advisor (Retired)
smacmartin
Posts: 499
Registered: ‎05-07-2012
My Carrier: developer

Re: Code compilation issue on NDK BB10_0_06


qnx6/usr/include/cpp/xmemory is the same in ndk 2.0.1 and 10.0.6.1

 

Is there context around the this error message?  Are you trying to create an allocator for an integer or pointer type, perhaps?

 

Stuart

Please use plain text.
New Contributor
raza_shah
Posts: 3
Registered: ‎08-09-2012
My Carrier: blackberry 10

Re: Code compilation issue on NDK BB10_0_06

Thanks for the reply.

 

Actually, this game code was running fine on BB playbook (but on another machine). When I brought this game code to my machine and checked for BB 10 , the above error was reported. So, I uninstalled native SDK for BB 10 and installed native SDK for BB Tablet 2.0 . When I ran the game code , the same error (which I have posted in the previous post for BB device 10) again resurfaced for BB Tablet as well. 

 

Can you please guide me if I am missing some specific configuration setting ( regarding IDE or anything). Thanks a lot.

 

Raza

Please use plain text.
BlackBerry Development Advisor (Retired)
smacmartin
Posts: 499
Registered: ‎05-07-2012
My Carrier: developer

Re: Code compilation issue on NDK BB10_0_06

It sounds more like a stricter compiler setting.   The issue would be with whatever line you are instantiating -- there should be more lines around this error message that indicate where in your code the issue is.   Can you paste all errors and warnings from the build log?

 

Stuart

Please use plain text.
BlackBerry Development Advisor
smcveigh
Posts: 651
Registered: ‎11-29-2011
My Carrier: other

Re: Code compilation issue on NDK BB10_0_06

a compiler catching a signal while compiling is not good.  sounds like the tools are crashing.

Please use plain text.
New Contributor
raza_shah
Posts: 3
Registered: ‎08-09-2012
My Carrier: blackberry 10

Re: Code compilation issue on NDK BB10_0_06

[ Edited ]

Guys

 

The issue has been resolved. So I commented off one of the two functions (having const parameter), in xmemory file, which was causing the "function overload" error and it has now compiled successfullly on BB tablet. 

 

Thanks for your comments and input.

 

p.s. the game is running fine too for now.

 

Best Regards

Raza

Please use plain text.
BlackBerry Development Advisor (Retired)
smacmartin
Posts: 499
Registered: ‎05-07-2012
My Carrier: developer

Re: Code compilation issue on NDK BB10_0_06

That sounds like a workaround.   I'm still guessing there is an error in code USING the template which is why I asked if you have more warnings.  If you stick with this solution, remember it when you upgrade :smileyhappy:

 

Stuart

Please use plain text.
Developer
BGmot
Posts: 1,061
Registered: ‎11-24-2011
My Carrier: x

Re: Code compilation issue on NDK BB10_0_06

can you please post exact diff  you did? Thanks.

Please use plain text.