문제

I am having source code which is having classes and resources folder. I tried to create one blackberry project and import those files inside same project. I have linked cocos2dx with proper steps. What I am not clear with is how you will run a source code which has only classes and resources in blackberry momwntics IDE. If anyone has any kind of idea or hint or clue or direction then please respond. Thanks ...

도움이 되었습니까?

해결책

I also faced the same issues when trying to get cocos2d-x for blackberry running in the Momentics IDE. The code sample provided is not very well organised and clearly does not follow the file hierarchy or structure of conventional Momentics IDE bb10 projects. I personally find this to be quite confusing - especially to programmers with little experience programming in C++, linkers etc.

That being said, I there are a series of steps you can follow to get cocos2d-x for blackberry running .

  1. Download the Cocos2d-x project from http://www.cocos2d-x.org/ . This folder contains the cocos2d main libraries , sample code, and platform specific libraries for different platforms (web, desktop, iphone, android, blackberry).

  2. The next task is to import the cocos2d libraries required for blackberry development into the Momentics IDE and successfully build the first project. A quick search of the Cocos2dx source directory reveals a list of proj.blackberry files which indicate blackberry related projects that could be imported. I found that importing the following proj.blackberry files into my workspace were sufficient to help me build the sample project included .

    /cocos2d-x-2.1.4/cocos2dx/blackberry/proj.blackberry /cocos2d-x-2.1.4/CocosDenshion/blackberry/proj.blackberry /cocos2d-x-2.1.4/extensions/blackberry/proj.blackberry

  3. Note that the main reasons for importing the projects above it to make them available as referenced projects to your libraries. This pretty much should handle errors of missing files or paths etc.

    /cocos2d-x-2.1.4/template/blackberry/proj.blackberry

(This is the sample project which we will run and compile – BBTemplateProject)

  1. To import each of the above File > Import > Existing Project into Workspace > Cocos2dx source directory above At this point you should have the BBTemplateProject imported. Now try to build it..

I have written a more detailed post about this here http://www.denvycom.com/blog/setting-up-cocos2d-for-blackberry-10-development/ . This post also includes a quick fix to handle a decode.h error you might encounter while trying to build your project.

P.S > I found that the bar-descriptor.xml file lets the compiler know where the relevant included files/classes reside (including the strange Resources folder) . This is why the unconventional heirachy structure works. There are still a few issues Im having working with cocos2d-x for blackberry (such as getting the QtSql libraries integrated and working in a cocs2d-x for Blackberry project) and I'll post solutions as soon as I find any.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top