How to install x11 headers on android?

  • Context:
  • Thread starter Thread starter jk22
  • Start date Start date
  • Tags Tags
    Android install
Click For Summary

Discussion Overview

The discussion revolves around the challenges of compiling C code that utilizes X11 headers on an Android platform, particularly in the context of using cppdroid and an X server installed on Android. Participants explore methods for addressing the lack of X11 headers in the Android environment.

Discussion Character

  • Exploratory, Technical explanation, Debate/contested

Main Points Raised

  • One participant inquires about how to compile C code for X11 on Android, noting the absence of X11 headers.
  • Another participant suggests the possibility of cross-compiling as a potentially easier solution.
  • A third participant seeks clarification on the meaning of cross-compiling, questioning whether it involves compiling on Linux and transferring the executable to Android.
  • A subsequent reply confirms that cross-compiling involves generating code for a different OS/architecture and notes that many compilers support this feature, although the participant expresses uncertainty about X11's functionality on Android.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best approach to compile the code, and multiple viewpoints regarding cross-compiling and its implications are presented.

Contextual Notes

The discussion does not clarify specific requirements for X11 functionality on Android or the exact capabilities of the suggested cross-compilation methods.

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.
 

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
5K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 15 ·
Replies
15
Views
8K
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
6K