vishalhsoni at August 4th, 2012 08:13 — #1
I wanted to develop cross platform application to run on IPhone and Android. I wrote the code for IPhone and its working properly. When I used Classes folder .cpp and .h in my Android application it was giving errors in Destructor calls, exception handling etc.. Is it because IOS C++ compiler/builder works different than Android builder/compiler. BTW i am developing my Android application using Windows 7 using Cygwin as a builder/compiler. What can be the problem?
Other issue I got in Android was that when leaving and re-entering the IPhone application the scene was pausing perfect. But in Android the scene was getting messed up while doing same steps.
walzer at August 4th, 2012 12:21 — #2
- For compilation error, please paste the error log here. Some c++ syntax is supported by llvm, but not gcc, for example, anonymous structure.
- Which version of cocos2d-x are you using? The difference is that, ios system would do everything at background-foreground switching, but android would not. CCTextureCache::reloadAllTextures() is written to deal with reloading textures at back->foreground switch on android. Please check you have enough memory on your android device, or track into this function and make sure all textures are reloaded successfully.
walzer at August 4th, 2012 12:38 — #3
More details please.
* Android SDK version
* The name of Android device
vishalhsoni at August 6th, 2012 01:49 — #4
Hi, thanks for the reply.
- Compilation error : Suppose I have a class hierarchy C inherited from B and B inherited form A (C ~~> B~~> A). Now when calling destructor, I call this statement B::\~B ();* in my C class and call *A::\~A(); in my B class. When I build my project I get the following error in my B class:
**Multiple markers at this line
- candidate is:
- no matching function for call to
Another compilation error I am getting is while using *try catch* and that is following:
\*exception handling disabled, use -fexceptions to enable\*
while writing catch statements as below:
\*catch (std::exception e)**
- I am using cocos2d-2.0-rc2-x-2.0.1 as Cocos2D-X version from [[http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Download]].
Where to write this CCTextureCache::reloadAllTextures*
3. Android SDK Version isAndroid 2.2**.
4. Device name is**HTC One V*.