linux - Running C code on android using termux or gnuroot? -


i'm trying run c code on android device using various terminal emulator apps. have tried 3 far , of them giving me errors. first 1 tried popular: terminal ide. ever since later versions of android have been released app not compile c code due position independent executable (pie) error. next promising app called termux. see picture , example of of tried in appthis app allows me compile c code gcc gives me "permission denied" errors whenever try run simplest of codes. have examined , researched error thoroughly. have tried using chmod in various different ways checking permissions using ls -l , have tried compiling , running in both external sd card on internal device storage. understand sd card doesn't have exec permission still won't work in device's internal memory. have asked termux creator no avail. no matter cannot seem these codes run on android device. not rooted , don't plan root time soon. of these apps claim should work without rooting device. tried running c code in app (my last hope) called gnuroot. unfortunately i'm still getting permission denied error, code compile did in termux. can't access of directories created these apps way. hidden "my files" app lets me browse directories on device. however, directories shown when type in ls not in files app, can't place files directly in them. can see basic home directories termux , gnuroot, when try place code in there, still permission denied error. furthermore, don't know directory place code in work. i'm totally lost , need help. thanks.

i've gotten c programs running under termux using gcc.

while compiling, compile code using -o option, , no -c, this:
gcc -o helloworld helloworld.c

object file helloworld created execute permissions , can run ./helloworld.

note source files must in home directory first. if haven't changed environment variables, first go home directory cd , compile source files there.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -