TADP1 -> TADP2 & VS report

Initial project was developed from the TADP1/NTASP native_globe, built using the standard NDK_BUILD scripts. This was modified to include additional Java classes & other static libs.

I attempted to import the existing prject into VS multiple times using a variety of methods: e.g.:

  1. Creating the TADP2 VS project over the existing code in the same directory using the “Import Android Project” template. This failed, it seemed to be attempting to copy files over themselves (e.g AndroidManifest.xml) resulting in failure. Possibly a VS issue rather than a TADP2 issue?

  2. Moved the original project into a temp directory and then created the new TADP2 project in it’s original location using the “Import Android Project” template. Project creation succeeded but the build did not function correctly: warnings about potentially incorrect NDK_BUILD_PATH. C++ files in the static libs built only after putting in absolute paths to them into the Android.mk file. Main project source files were not being built. Set LOCAL_PATH to an absolute path: didn’t work. Abandoned this approach as I’m not an expert at debugging broken Android build scripts.

(Note that I had the “Create directory for solution” option UN-ticked at project creation!)

Created a new VS project using the “Android Native Application” template: using the VS build system instead of the Android NDK build system. Removed the new project created code and updated the project with my existing code and static libs.
Missing a template to add Android static libs so I had to create the static libs initially as Win32 static libs and reconfigure all the settings to the proper Android ones. Static libs compiled fine after that.
Library outputs from static lib dependencies not being linked into the main project so had to add these in Linker->Input->Additional Dependencies. Project now compiles correctly. (Project dependencies were set correctly and Linker->General->Link Library Dependencies = ‘yes’ so there’s something wrong with the automatic linking of static lib dependencies).
Noticed that C/C+±>Optimisation->Inline Limit set to 100 when the default is 600!
C/C+±>Optimisation is missing a GCC optimisation critical for high performance games: -ffast-math.
C/C+±>Optimisations missing -mfloat-abi=softfp that is supposedly required in the Android build when using -mfpu=neon?
Attempted to run the game but gdb-server was missing from the APK. Had to add Debugging->GDB Server Location = $(PackagedGdbServerPath) as mentioned in the ‘help’ at the bottom of the configuration pane.
Game finally deployed to Nexus7 and ran fine!

Cheers, Jason.

p.s. system:
Visual Studio 2010 Pro: version 10.0.40219.1 SP1Rel
Win 7 Pro: 6.1.7601 SP1 Build 7601

From the NDK Dev Guide → Standalone Toolchain:

"4/ ABI Compatibility:

If you want to target the ‘armeabi-v7a’ ABI, you will need ensure that the
following two flags are being used:

CFLAGS=‘-march=armv7-a -mfloat-abi=softfp’

If you want to use Neon instructions, you will need one more compiler flag:

CFLAGS=‘-march=armv7-a -mfloat-abi=softfp -mfpu=neon’