Package Details: sdl_bgi 2.5.0-1

Git Clone URL: https://aur.archlinux.org/sdl_bgi.git (read-only, click to copy)
Package Base: sdl_bgi
Description: Port of the old Borland Graphics Interface (graphics.h), originally written for DOS, written using SDL2
Upstream URL: http://libxbgi.sourceforge.net/
Keywords: graphics.h
Licenses: zlib
Provides: libSDL_bgi.so
Submitter: Tedyst
Maintainer: Tedyst
Last Packager: Tedyst
Votes: 0
Popularity: 0.000000
First Submitted: 2021-11-18 19:04 (UTC)
Last Updated: 2021-11-18 19:04 (UTC)

Latest Comments

schrmh commented on 2025-03-11 20:51 (UTC) (edited on 2025-03-12 11:42 (UTC) by schrmh)

pkgver=3.0.2
source=("https://sourceforge.net/projects/sdl-bgi/files/SDL_bgi-${pkgver}.tar.gz")
sha256sums=('9c4657d1b19094d3e6ed7b6879a04c709c1042bd8be4800437eb53d08ef985b9')

conflicts with libgraph. Not sure which of the two is more useful, especially to quickly get some old WinBGIm stuff I have lying around working under X11.

Edit: looks good:
https://sdl-bgi.sourceforge.io/compatibility.html
»SDL_bgi has been designed to be functionally compatible with the old Borland Graphics Interface (GRAPHICS.H) for DOS, and with WinBGIm, which itself is a mostly complete GRAPHICS.H implementation.

SDL_bgi is a superset of both, and as far as I can say it provides the most compatible GRAPHICS.H implementation available.«

However, compiling the examples leaves me with errors about too many arguments for the random function. Duh.

Edit 2:
For conio.h replacement use https://gitlab.com/marcodiego/conio
And add this to the Makefile:

.PHONY: install
install: conio.h mem.h io.h dos.h bios.h alloc.h unstd.h
    @for file in conio.h mem.h io.h dos.h bios.h alloc.h unstd.h; do \
        if [ -f /usr/include/$$file ]; then \
            printf "/usr/include/$$file already exists\n"; \
        elif [ -w /usr/include/ ]; then \
            cp $$file /usr/include/; \
        else \
            printf "Please run with elevated privileges to install $$file\n"; \
        fi \
    done

Then sudo make install

Edit 3:
I tried from source but I think I'm still missing something...:
LANG=C gcc -o demo demo_official.c -lSDL_bgi -lSDL2

/usr/bin/ld: /usr/local/lib/libSDL_bgi.so: undefined reference to `sin'
/usr/bin/ld: /usr/local/lib/libSDL_bgi.so: undefined reference to `cos'
/usr/bin/ld: /usr/local/lib/libSDL_bgi.so: undefined reference to `round'
/usr/bin/ld: /usr/local/lib/libSDL_bgi.so: undefined reference to `floor'
collect2: error: ld returned 1 exit status

Edit 4:
Documentation seems to miss -lm when compiling. I contacted the author and he told me to add this. I actually did not consider trying that out before.