Hi,
I decided to create a hybrid Win32 and Android project. Here are the steps. However my Android project runs upside down, they appear to be rotated by 90º ClockWise . I have posted all images and settings used. Please advice on proper course of action.
Win32 Project
-
Created my Win32 “winand” Project using the Wizard on Visual Studio 2010. Sound and Box2D (default settings).
-
Changed one string “Hello World” to “Hello World WinANDROID” and size to 32.
-
Build my Win32 project
-
Test by Run project. Works perfect.
Android Project
- Rename Win32 Folder to “winand_TEMP”
- Use script: create-android-project.bat to create a folder with the previous name
- package name: org.cocos2d.winand
- project name: winand
- copy android folder into winand_TEMP
- remove winand
- rename winand_TEMP to winand
- open Cygwin batch shell and navigate to …/winand/android folder
- build project using ./build_native.sh
ERRORS:
Compile thumb : stlport_static <= c_locale.c
Compile thumb : stlport_static <= cxa.c
StaticLibrary : libstdc++.a
make: Circular /cygdrive/c/Users/dan/Downloads/cocos2d-1.0.1-x-0.9.2/cocos2d-1.0
.1-x-0.9.2/winand/android/obj/local/armeabi/libstlport_static.a <- /cygdrive/c/U
sers/dan/Downloads/cocos2d-1.0.1-x-0.9.2/cocos2d-1.0.1-x-0.9.2/winand/android/ob
j/local/armeabi/libstlport_static.a dependency dropped.
StaticLibrary : libstlport_static.a
SharedLibrary : libcocos2d.so
Install : libcocos2d.so => libs/armeabi/libcocos2d.so
Compile++ thumb : cocosdenshion <= SimpleAudioEngine.cpp
Compile++ thumb : cocosdenshion <= SimpleAudioEngineJni.cpp
SharedLibrary : libcocosdenshion.so
Install : libcocosdenshion.so => libs/armeabi/libcocosdenshion.so
Compile++ thumb : game <= main.cpp
Compile++ thumb : game <= AppDelegate.cpp
In file included from C:/Users/dan/Downloads/cocos2d-1.0.1-x-0.9.2/cocos2d-1.0.1
-x-0.9.2/winand/android/jni/helloworld/../../../Classes/AppDelegate.cpp:8:
C:/Users/dan/Downloads/cocos2d-1.0.1-x-0.9.2/cocos2d-1.0.1-x-0.9.2/winand/androi
d/jni/helloworld/../../../Classes/HelloWorldScene.h:6:25: error: Box2D/Box2D.h:
No such file or directory
make: *** [/cygdrive/c/Users/dan/Downloads/cocos2d-1.0.1-x-0.9.2/cocos2d-1.0.1-x
-0.9.2/winand/android/obj/local/armeabi/objs-debug/game/../../../Classes/AppDele
gate.o] Error 1
make: Leaving directory `/cygdrive/c/Users/dan/Downloads/cocos2d-1.0.1-x-0.9.2/c
ocos2d-1.0.1-x-0.9.2/winand/android'
It appears that Box2D can’t be found. OK looking at the error code it wants Box2D inside the …/winand/Classes. OK let’s do that!
8) Copy Box2D folder from root cocos2d-x into …/winand/Classes.
9) Start Eclipse, create New Android Project, create project from existing source, point it to …/winand/android and select the SDK API level.
10) Build the package
11) Connect USB Device.
12) Run as Android Application.
Application starts but there are some issues, the application runs upside down.
Image Capture from Samsung Galaxy S i9000
This is the manifest file