android: update native_app_glue
authorAlexis Laferrière <alexis.laf@xymus.net>
Tue, 24 Oct 2017 19:32:52 +0000 (15:32 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Wed, 22 Nov 2017 16:54:41 +0000 (11:54 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/android/native_app_glue.nit
lib/android/nit_activity.nit

index f83350e..2a8f895 100644 (file)
@@ -37,7 +37,7 @@
 #   main activity of the running application. Use it to get anything related
 #   to the `Context` and as anchor to execute Java UI code.
 module native_app_glue is
-       ldflags "-landroid"
+       ldflags("-landroid", "-lnative_app_glue")
        android_activity "android.app.NativeActivity"
 end
 
@@ -56,7 +56,8 @@ in "C body" `{
        // We relay the call to the Nit application.
        void android_main(struct android_app* app) {
                native_app_glue_data = app;
-               app_dummy();
+
+               int main(int argc, char ** argv);
                main(0, NULL);
        }
 
index 1bdf597..dac5a78 100644 (file)
@@ -64,6 +64,7 @@ in "C body" `{
                global_jvm = vm;
 
                // Invoke Nit system and main
+               int main(int argc, char ** argv);
                main(0, NULL);
 
                return JNI_VERSION_1_2;