I understood that it is not possible to run C code with gcc for a file in sdcard directories, sudo is required. But I see that it's possible to run Ruby files with Ruby. I don't understand why. Can someone say me what languages can be run in sdcard in the terminal?

Re: Termux on Android for unrooted device 80 80

https://www.google.com/search?q=c+compiler+for+android finds other compilers. Why must it be gcc? Also you wrote C and not C++.

It needs to be written that Android is not like your full size OSes like Linux. Once in a while you run into someone that wants Android and iOS to be a full fledged OS.

Also, https://gist.github.com/VirajKanse/1c0db872cd7685632c02f8826397f190 notes other issues, commands. Not GCC but clang.

Re: Termux on Android for unrooted device 80 80

@rproffitt Thanks so much. Your second link did help me a lot. It works perfectly.

Re: Termux on Android for unrooted device 80 80

But afterwards I tried to run a file after entering with cd in the directory where snippets are stored, I typed " clang filename.c -o filename" and the code was not compiled. I don't understand what would changed.

Re: Termux on Android for unrooted device 80 80

Just my guess. Permissions. Check the file permissions, ownership, etc.

Re: Termux on Android for unrooted device 80 80

I found this

https://stackoverflow.com/a/40702663/4398376

They say that one cannot run in sdcard

I have unrooted device.

I am persued it was working yesterday.

Re: Termux on Android for unrooted device 80 80

Since you can not repeat your success, then you have to try it per the methods folk tell you it does work. My thought is this is not to be. You are trying to push the limits of this system and it is pushing back.

Why not use your PC for learning C and such?

Re: Termux on Android for unrooted device 80 80

Thanks anyway!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.