192 | | The Android platform provides only a very minimal C++ runtime support library (/system/lib/libstdc++) and corresponding headers for it in the NDK. To compile the game with the Standard C++ Library, we have to explicitly enable the GNU STL runtime. |
| 191 | The Android platform provides only a very minimal C++ runtime support library (/system/lib/libstdc++) and corresponding headers for it in the NDK. To compile the game with the Standard C++ Library, we have to explicitly instruct `ndk-build` to compile against the STL runtime. |
| 192 | |
| 193 | Create a new file called `Application.mk` under `jni` in the project directory, e.g.: |
| 194 | |
| 195 | {{{ |
| 196 | $ nano -w ~/android/0ad/jni/Application.mk |
| 197 | }}} |
| 198 | Insert these two lines in the file, substituting the part after the `:=` on the first line with the full path of your project directory:{{{ |
| 199 | APP_PROJECT_PATH := /home/youruser/android/0ad |
| 200 | APP_STL := stlport_static |
| 201 | }}} |
| 202 | Then save the file and exit the text editor. |