this is requires to pass command-line arguments to Haxe for it to return via Sys.args()
extern int _hxcpp_argc;
extern char **_hxcpp_argv;
extern "C" void hxcpp_main();
int main(int argc, char *argv[]) {
_hxcpp_argc = argc;
_hxcpp_argv = argv;
hxcpp_main();
return 0;
}
exec("haxe -cp src --main src.Main -cpp cpp_build-android " + LIBS + " -D HXCPP_ARM64 -D android -D PLATFORM=android-9 -D ANDROID_NDK_ROOT=\"" + NDK + "\"")
exec(NDK + "/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -Wl,-rpath,. --target=aarch64-linux-android21 main.cpp liblog.so libandroid.so libEGL.so libGLESv2.so libGLESv1_CM.so libOpenSLES.so liblime.so cpp_build-android/libMain-64.so")
C:\Users\small\AppData\Local\Temp\main-d0f624.o: In function `main':
main.cpp:(.text+0x10): undefined reference to `_hxcpp_argc'
main.cpp:(.text+0x14): undefined reference to `_hxcpp_argc'
main.cpp:(.text+0x18): undefined reference to `_hxcpp_argv'
main.cpp:(.text+0x1c): undefined reference to `_hxcpp_argv'
this is requires to pass command-line arguments to Haxe for it to return via
Sys.args()hxcpp/src/hx/StdLibs.cpp
Line 55 in 75b25c3
hxcpp/src/hx/StdLibs.cpp
Line 56 in 75b25c3
exec("haxe -cp src --main src.Main -cpp cpp_build-android " + LIBS + " -D HXCPP_ARM64 -D android -D PLATFORM=android-9 -D ANDROID_NDK_ROOT=\"" + NDK + "\"")exec(NDK + "/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -Wl,-rpath,. --target=aarch64-linux-android21 main.cpp liblog.so libandroid.so libEGL.so libGLESv2.so libGLESv1_CM.so libOpenSLES.so liblime.so cpp_build-android/libMain-64.so")