how to make a native application with a normal main function ?

35 views
Skip to first unread message

Pikachuk 2

unread,
Nov 30, 2017, 11:17:23 AM11/30/17
to android-ndk
Hello, i make this post because i don't understand at all why would the fact to make a simple C++ app require java while it should just run natively through the hardware
i simply want to make a c++ app with a main method that starts it and use a console without writing any java code, not even the function declaration
how could i make it ?
(even making a 3ds homebrew is easier than making a legit native android application, it shows how much the thing is not well implemented)

Glenn Kasten

unread,
Nov 30, 2017, 11:19:54 AM11/30/17
to android-ndk

Dan Albert

unread,
Nov 30, 2017, 2:47:22 PM11/30/17
to android-ndk
If you want to make a console app then just do what you described. Use BUILD_EXECUTABLE instead of BUILD_SHARED_LIBRARY in ndk-build, or add_executable in cmake. Android behaves pretty much the same was as any other linux distro from the perspective of an executable.

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+unsubscribe@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/bf6f9f8b-cac0-4ef3-bf10-c60441eda0f7%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages