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?

Recommended Answers

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 …

Jump to Post

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

Jump to Post

All 7 Replies

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.

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

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.

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?

Thanks anyway!

Be a part of the DaniWeb community

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