08-08-2012 06:20 AM
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>::
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.
08-09-2012 01:18 AM - edited 08-09-2012 01:22 AM
Here is the actual error that occured (in regards to Ahsan's post) :
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
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&]'
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.
08-09-2012 11:17 AM
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?
08-10-2012 07:56 AM
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.
08-14-2012 04:54 PM
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?
08-15-2012 12:27 AM - edited 08-15-2012 12:38 AM
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.
08-15-2012 09:15 AM
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