Guidance on: GRX, libpng, jpeglib and DJGPP builds general.

DOS specific questions.
Post Reply
Posts: 67
Joined: May 31, 2022 6:49
Location: Australia

Guidance on: GRX, libpng, jpeglib and DJGPP builds general.

Post by Axle »

Hi team
I am setting up the fbc environment for use with FreeDOS 1.3 and W9x and need some assistance with the correct builds to match the FBC DOS library.
As well as the DJGPP builds I am also looking for the corresponding MinGW32(32-64) and Ubbuntu64 source, but focus on the DOS source.
I hope I am not asking too many questions in a single topic X-)

Q1. Compiling libraries under Win9x DJGPP. I compiled and tested the PDCurses library and ran the example fireworks successfully on FreeDOS but am uncertain about the correct djgpp build environment. I followed and used the DJGPP install form
I was not sure which compiler version to use so I went with "".
Q1a. Is this the correct version?

When compiling the PDCurses library I made the following changes (As a guess) to the library.

Code: Select all

 * Include essential vendor headers
#include <sys/types.h>     /* for ssize_t         */
#include <sys/time.h>      /* for struct timeval  */
/*#include <sys/socket.h>    / for sockaddr        */
#include <signal.h>        /* for sigset_t        */
/*#include <sys/wtime.h>     / for struct timespec */
#include <unistd.h>        /* for off_t           */
/*#include <sys/select.h> */
Q1b. Is this a correct assumption for all fbc DOS library builds, or should I just use the default DJGPP build system for all fbc libraries without the changes?
(Note: I have to build the same libraries for C projects as well, so If I can get away with a single DJGPP build environment without swapping the PATH environment, or changing the above header would be convenient.)

Q2. I am wanting to test the GRX library and use it across DOS, W9x, Windows(x86-64) and Ubuntu(x86-64). I would at a minimum like to include the PNG support. Including the libjpeg, libz and lib tiff would also be welcome :) Looking at the headers I have a choice of several versions. Looking across the web I find many different source repositories for the libraries :( I am assuming Version libpng16 is the same as V1.6.xx ?
Q2a. What would be the best/correct compatible version and source location for GRX DJGPP builds?
[Update] this looks like potential + libz Still uncertain aboutDJGPP Version.


-libz [update] with libpng? (zlib vs libz ? for GRX )[update2] I think this should be "-zlib.a", zlib.h(bi) MGRX uses libz.a which confused me.


Q2b. Any recommended build switches for GRX fpr FBC djgpp?

Code: Select all

# Specify if you have libpng.a and corresponding .h files.
I assume this means that the the compiled archive files will be available when compiling a GRX project?

Q2c Is the GrGUI library available in GRX as in MGRX? has anyone tried to add it in to GRX? Has anyone attempted to use the MGRX with FreeBASIC?

I am looking to implement a rudimentary BGI/graphics.h + GUI across DOS, Win, and nix. BGI DOS is proprietary(Although Borland did release TC DOS as free to use?) so GRX/MGRX is the next closest or alternatively Allegro which is a bit heavy.
I know @ coderjeff has a library jmgui but it is FB only (I don't know what the licencing status would be on the C source for gfxlib2 or even if it could be used stand alone in a C environment). MGUI has potential, so I will likely look at GRX/MGRX (GrGUI), GChart and MGUI as a starter base.

I am welcome to suggestions on a base graphics and GUI library but it must be FB, C as well as DOS, Win32(64), linux(64).
(Yes someone else aiming to add to the FB GUI fruit salad bowl lol X-)

Thanks in advance
Axle :)
Posts: 67
Joined: May 31, 2022 6:49
Location: Australia

Re: Guidance on: GRX, libpng, jpeglib and DJGPP builds general.

Post by Axle »

Hi all
An update on my questions above:

I haven't had a chance to compile or test a demo with these yet and still running blind, but so far I seam to have 2/3 alternative locations with different source files..
libjpeg: (V6b, V9)

I haven't attempted to compile any of the above yet as I decided to go with the DJ Delorie packages for the moment as it is the closest version match to FBC DOS..

zlib and libpng compile tests passed and interestingly I used the djgpp to compile libpng instead of my compiled objects archive.
Also I found compiling zlib with the defaults gave me a ~115KiB file whereas the binary from is~97KiB so I am guessing there are some optimization switches in the config somewhere, or I did something wrong lol
(I did read in one of these libraries a warning to not use compiler optimizations but can't recall which one).

Considering the above It is likely that I could just use the binary version packages directly form Delorie in FBC DOS?
I still have to get familiar with compiling these libraries for Win32 and Ubuntu. And I am still compiling with <sys/socket.h>, <sys/wtime.h>, <sys/select.h> commented out.

P.S. I was unsure if to ask in DOS or Libraries on the above questions, so forgive me if I posted in the incorrect forum.

Post Reply