Hello everyone,
I have a game that I have created using cocos2d-x and build initially for iPhone.
In the iPhone build process it builds and runs perfectly well.
Now I am trying to get it to run on android and I have a couple of problems when using the ./build_native.sh script and would like to know if anyone has had the same issues before or could give me some insight on how to solve the problems:
First of all a few of my scenes that have multiple definition errors, for instance here is the first:
@
SharedLibrary : libgame.so
./obj/local/armeabi/objs-debug/game/…/…/…/Classes/TipsScene.o:(.data.rel.ro+0x0): multiple definition of `vtable for TipsScene’
./obj/local/armeabi/objs-debug/game/…/…/…/Classes/TipsScene.o:(.data.rel.ro+0x0): first defined here
./obj/local/armeabi/objs-debug/game/…/…/…/Classes/TipsScene.o: In function `TipsScene::scene()’:
TipsScene.cpp:(.text.*ZN9TipsScene5sceneEv+0x0): multiple definition of `TipsScene::scene’
./obj/local/armeabi/objs-debug/game/…/…/…/Classes/TipsScene.o:TipsScene.cpp:: first defined here
./obj/local/armeabi/objs-debug/game/…/…/…/Classes/TipsScene.o: In function `TipsScene::init’:
TipsScene.cpp:: multiple definition of `TipsScene::init’
./obj/local/armeabi/objs-debug/game/…/…/…/Classes/TipsScene.o:TipsScene.cpp:: first defined here
@
I am using an #include guard like follows in my header and do not see anything different from the scenes that do not cause any errors .
#ifndef**TIPS_SCENE_H*_
#define TIPS_SCENE_H
>
…
>
#endif // TIPS_SCENE_H
For my second error I have not finished exploring all possible solutions so will post more information about it once that is the case.
Thanks for any help that can be provided