How to get X11/xxx for compile

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
MooseOnTheLoose
Level 1
Level 1
Posts: 9
Joined: Wed Sep 15, 2021 6:37 pm

How to get X11/xxx for compile

Post by MooseOnTheLoose »

Some of my source code uses
#include <X11/Xlib.h>
#include <X11/Xutil.h>
gcc complains that these are not found.
How do I get those to be available to compile?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
djph
Level 7
Level 7
Posts: 1938
Joined: Thu Jun 27, 2019 5:43 am
Location: ::1

Re: How to get X11/xxx for compile

Post by djph »

probably something like libx11-dev in the repos (stab in the dark though).

I think the command apt search can be used to get the correct package name (e.g. apt search Xlib.h).
MooseOnTheLoose
Level 1
Level 1
Posts: 9
Joined: Wed Sep 15, 2021 6:37 pm

Re: How to get X11/xxx for compile

Post by MooseOnTheLoose »

djph wrote: Mon Sep 20, 2021 7:19 am probably something like libx11-dev in the repos (stab in the dark though).

I think the command apt search can be used to get the correct package name (e.g. apt search Xlib.h).
:D :D :D
Close:
sudo apt install libx11-dev

did get it for me
Now I have an unrelated problem for another question perhaps this weekend
djph
Level 7
Level 7
Posts: 1938
Joined: Thu Jun 27, 2019 5:43 am
Location: ::1

Re: How to get X11/xxx for compile

Post by djph »

MooseOnTheLoose wrote: Tue Sep 21, 2021 7:30 pm
djph wrote: Mon Sep 20, 2021 7:19 am probably something like libx11-dev in the repos (stab in the dark though).

I think the command apt search can be used to get the correct package name (e.g. apt search Xlib.h).
:D :D :D
Close:
sudo apt install libx11-dev
Seems I was spot on with the package name. ;)
Locked

Return to “Beginner Questions”