How to install x11 headers on android?

  • Thread starter Thread starter jk22
  • Start date Start date
  • Tags Tags
    Android install
Click For Summary
Compiling C code for X11 on Android presents challenges due to the absence of X11 headers. A suggested solution is cross-compilation, which involves compiling the code on a Linux system while targeting the Android architecture. This method allows developers to create executables that can run on Android, despite the differences in operating systems. While the specifics of X11 may not directly translate to Android, similar functionalities are likely available, making it feasible to adapt the code for the Android environment.
jk22
Messages
732
Reaction score
25
Hello,

I'm using cppdroid and wrote a c code running a window on x11 (originally Ubuntu Linux) and installed a xserver on android. How could i compile this code on Android knowing it lacks the x11 headers ? Thanks.
 
Technology news on Phys.org
Maybe this is a silly suggestion, but would it be possible (and easier) to cross compile?
 
I don't know what you mean by this. Is it to compile under linux and put the executable on android ?
 
jk22 said:
I don't know what you mean by this. Is it to compile under linux and put the executable on android ?
Yes. Many compilers will let you specify the target architecture of code you're compiling. Ordinarily, when your compiler is running on a particular OS, the code you compile will run on that same OS. A cross compiler will generate code that will run under a different OS/architecture.

I'm not familiar with X11, but if your code is intended to run on Android, I'm reasonably sure it has the same or similar functionality as is available in X11.
 
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
Replies
10
Views
6K
Replies
4
Views
5K
Replies
11
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 15 ·
Replies
15
Views
8K
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
5K