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
Developer
VivekAgar
Posts: 79
Registered: ‎09-22-2010
My Device: 9700
Accepted Solution

can't setup Cocos2Dx for PlayBook native development

hi, 

 i am trying  to setup cocos2dx for playbook in native QNX  Momentix IDE, i followed instructions as on 

 

http://www.cocos2d-x.org/projects/cocos2d-x/wiki/How_to_run_HelloWorld_and_Tests_on_BlackBerry_Table...

 

but after importing when i Build project (TestCocos2dX) get Following Errors  in console

**** Rebuild of configuration Device-Debug for project TestCocos2dx ****

**** Internal Builder is used for build               ****
qcc -o main.o ..\main.cpp -V4.4.2,gcc_ntoarmv7le_cpp -w1 -IC:/bbndk-2.0.0-beta3/target/qnx6/usr/include/freetype2 -IC:/bbndk-2.0.0-beta3/target/qnx6/../target-override/usr/include -I../../ -I../../../ -I../../../cocos2dx -I../../../cocos2dx/include -I../../../cocos2dx/platform -I../../../cocos2dx/platform/qnx -I../../../chipmunk/include/chipmunk -I../../../CocosDenshion/include -D_FORTIFY_SOURCE=2 -c -g -fstack-protector-all
..\main.cpp:1:21: error: cocos2d.h: No such file or directory
..\main.cpp:2:25: error: AppDelegate.h: No such file or directory
..\main.cpp:4: error: expected constructor, destructor, or type conversion before ';' token
..\main.cpp: In function 'int main(int, char**)':
..\main.cpp:8: error: 'AppDelegate' was not declared in this scope
..\main.cpp:8: error: 'app' was not declared in this scope
..\main.cpp:10: error: expected type-specifier before 'AppDelegate'
..\main.cpp:10: error: expected ';' before 'AppDelegate'
..\main.cpp:11: error: 'cocos2d' has not been declared
..\main.cpp:12: error: type '<type error>' argument given to 'delete', expected pointer
cc: C:/bbndk-2.0.0-beta3/host/win32/x86/usr/lib/gcc/arm-unknown-nto-qnx6.5.0eabi/4.4.2/cc1plus caught signal 1
Build error occurred, build is stopped
Time consumed: 208  ms.  

 

when i trying to Build cocos2dx got errors in Consol

**** Rebuild of configuration Device-Debug for project cocos2dx ****

**** Internal Builder is used for build               ****
qcc -o CCCamera.o ..\..\CCCamera.cpp -V4.4.2,gcc_ntoarmv7le_cpp -w1 -shared -IC:/bbndk-2.0.0-beta3/target/qnx6/usr/include/freetype2 -IC:/bbndk-2.0.0-beta3/target/qnx6/../target-override/usr/include -I../../../ -I../../../cocos2dx -I../../../cocos2dx/include -I../../../cocos2dx/platform -I../../../cocos2dx/platform/qnx -I../../../cocos2dx/platform/third_party/qnx/include/grskia -D_FORTIFY_SOURCE=2 -c -g -fstack-protector-all
cc1plus: error: ..\..\CCCamera.cpp: No such file or directory
cc: C:/bbndk-2.0.0-beta3/host/win32/x86/usr/lib/gcc/arm-unknown-nto-qnx6.5.0eabi/4.4.2/cc1plus caught signal 1
Build error occurred, build is stopped
Time consumed: 185  ms.  

 

 

 

 

 

what's wrong i have Done , or i forget something to do., i googled but not found any tutorials which can be helpful...

this will be Great if someOne from BB, or forum  post a video /YouTube video for complete process to run a HelloWorld cocos2dx for playbook.

 

 

:

 

  

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: can't setup Cocos2Dx for PlayBook native development

Did you happen to use "Copy projects into workspace" when importing? I did this first but the project does not include the source files, so the actual source is not copied with the projects. You need to keep the files in their original location (do not copy into your workspace) so they can be referenced relative to the project directory. After I made this change the project builds and runs properly :smileyhappy:.

 

Give this a try and let us know if it works for you afterwards.

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Developer
VivekAgar
Posts: 79
Registered: ‎09-22-2010
My Device: 9700

Re: can't setup Cocos2Dx for PlayBook native development

Thanks A lot, Problem was Exactly same as u Defined........I just Unchecked the Copy projects in WorkSpace.
The BlackBerry Developer Forum /Eco System is Best ,..Always Touches Solutions .....:smileyhappy:
Please use plain text.