diff --git a/build/android/app/src/main/cpp/main.cpp b/build/android/app/src/main/cpp/main.cpp index d02bb12..7b1d624 100644 --- a/build/android/app/src/main/cpp/main.cpp +++ b/build/android/app/src/main/cpp/main.cpp @@ -217,10 +217,17 @@ void android_main(struct android_app* state) dlerror(); /* Clear any existing error */ int (*main)(int, char**) = (int (*)(int, char**))dlsym(handle, "main"); + LOGV("lib=%s handle=%p main=%p", libpath.c_str(), handle, main ); if(main) { status = main(0, nullptr); } + else + { + LOGE("lib %s doesn't have main()", libpath.c_str()); + status = EFAULT; + std::exit(status); + } if(handle) {