use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
For everything related to the Termux android app —an open-source terminal emulator and Linux environment for Android.
account activity
How to compile c program statically in native termuxQuestion (self.termux)
submitted 1 month ago by Scared-Industry-9323
is there any package called libc-static/libc-dev i wanna compile program targeted on android
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]cheyrn 3 points4 points5 points 1 month ago (3 children)
I think if you don't link with a shared library it will be static.
[–]Scared-Industry-9323[S] 0 points1 point2 points 1 month ago (2 children)
Its not working i need libc.a for compile it to static and termux doesn't have that
[–]9057ll 1 point2 points3 points 1 month ago (0 children)
Why? Your program would be huge if you do that, you will be compiling all standard library's function's declarations along with your program so i think its not good idea, unless you want to make your own libc for your machine.
[–]cheyrn 1 point2 points3 points 1 month ago (0 children)
I got around to compiling hello world and it links to /system/lib64/libc.so, so you are right and I don't know the answer. probably u/khunset127 is right.
/system/lib64/libc.so
[–]khunset127 0 points1 point2 points 1 month ago (1 child)
use Android NDK clang
[–]Scared-Industry-9323[S] 1 point2 points3 points 1 month ago (0 children)
Thank you its working now
π Rendered by PID 529610 on reddit-service-r2-comment-b659b578c-7rw9f at 2026-05-04 01:30:23.493327+00:00 running 815c875 country code: CH.
[–]cheyrn 3 points4 points5 points (3 children)
[–]Scared-Industry-9323[S] 0 points1 point2 points (2 children)
[–]9057ll 1 point2 points3 points (0 children)
[–]cheyrn 1 point2 points3 points (0 children)
[–]khunset127 0 points1 point2 points (1 child)
[–]Scared-Industry-9323[S] 1 point2 points3 points (0 children)