Where to get graphics.h library?

Hi!

I want to use graphics.h according to this tutorial: Basic Graphic Programming in C++, which states that I have to install build-essential, an apt package. The equivalent pacman package seems to be base-devel, which does not seem to install graphics.h.
Where should I be able to install it?

Cheers

These packages have graphics.h file, but I don’t know which you need, I’m not programmer :neutral_face:

$ pkgfile graphics.h
extra/gegl
extra/wxgtk-common
community/allegro4
community/arrayfire
community/freerdp
community/obs-studio
community/octave

Was just going to add something similar to @Tomek’s response:

pacman -Fx '\/graphics.h$'  # -x | --regex

After I do a pacman refresh/update, I also run pacman -Fy to keep the /var/lib/pacman/sync.*.files in sync.

build-essential in Debian/Ubuntu contains:

base-files
base-passwd
bash
bsdutils
coreutils
dash
debianutils
diffutils
dpkg
findutils
grep
gzip
hostname
init-system-helpers
libc-bin
login
ncurses-base
ncurses-bin
perl-base
sed
sysvinit-utils
tar
util-linux

Not sure whether any of those contain a graphics.h
(which is not a library, btw)

If you want to draw things on the screen in C++, use SFML (sfml package) (or SDL 2 the very least), both are properly packaged for Arch Linux / Manjaro. If you want to create graphical user interfaces, check out Qt, wxWidgets, GTK.

“BGI” (which graphics.h is a part of) is the Borland Graphics Interface, it is old, and it is not and has never been available for Linux.

1 Like

Thanks for the responses. I think I will use SDL2 then.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.