How to install raylib in termux? #2368
Replies: 6 comments 5 replies
|
@CAPTAIN1947 Personally, I have no idea, I never heard about termux before. I'm afraid it would require some investigation on the field... |
|
@raysan5 think WSL but for android not linux Linking to GL is likely to be even more problematical, besides GLFW doesn't support Android alas... |
|
For me, after some tweaks, it works. It cannot compile because raylib expect the system library at /usr/lib (or /usr/local/lib), but unfortunately termux's library is at $(PREFIX)/lib where PREFIX variable is an environment variable special for termux. So you just need to tell raylib's build tool to include that library path AND header path as well then you are good to go. Note that you need xorgproto package if you can't find X11/X.h header. I have include raylib into my mini side project (https://github.com/RechieKho/surf), it clones raylib so you don't need to install manually. It currently using raylib example to test whether the build script works. Note that it is under heavy (?) development and by the time you try it out it might have changed. By the way, this is not compile to android platform but more like compile to linux. For compiling to android platform, it is much much harder as there is no official support for it (damn you google). |
|
I am only try right now, but in proot-distros it is working (chroot normal linux in termux), and I was already create some script to other project https://github.com/MatejMagat305/vab-termux, it install ndk and sdk in termux and it would be possible to make apk from termux right now without change src, only makefile... |
|
Raylib can be installed now with the command I found out through this video |
|
You can develop a Raylib game on Termux. There are two paths: compiling for Linux and running through X11 or build an APK to install and run nativelly. Be advised that building an APK in Termux is rather complex, but it's still possible even without official and full Android NDK and/or SDK. It gives some advantages like multi-touch support but also takes some interesting features from desktop... So it's your choice! I'm actually trying to make my APK work but I'm not getting over it... I built a simple logging app but when I linked with Raylib it stopped working... Don't really know why, sadly. Building like a Linux program is way easier but you may need a keyboard and mouse depending on the gameplay style... I chose the APK path because I was getting a weird input lag issue with keyboard in the X11 version... By the way, the Raylib package you install with |

Uh oh!
There was an error while loading. Please reload this page.
Hello! How can I install raylib in termux? Raylib supports android platform so there is no reason why it shouldn't work in termux and so I tried to build it in termux but it failed. Yes I made sure to set the graphics to opengles but I am not sure what platform to set, as neither android nor raspberry pi work. Thank you.
All reactions