Programming guideline of WinDom
First utilisation
Before compiling your first WinDom application, you should install
the library in your environmment.
Copy from the WinDom package:
windom\include\windom.h
and optionally :
windom\include\scancode.h
windom\include\av.h
in the include folder of your compiler. Then copy the library itself
from the WinDom package :
- windom\lib\purec\windom.lib if you use Pure C
- windom\lib\gcc\libwindom.a if you use Gcc 2.9.xx or newer
- windom\lib\gcc281\windom.olb if you use Gcc 2.8.1
- windom\lib\sozobon\windom.a if you use Sozobon X
in you lib folder of you compiler.
Notice Gcc 2.9 runs only with MiNT with an Unix file system
hierarchy. For people using plain-TOS or MagiC, gcc 2.8.1 is a good
choice and works fine. Windom is compiled in 32-bit mode.
In addition, WinDom requires absolutely GEMLIB pl43. The PCGEMLIB
from Pure C is not supported. GEMLIB is available for Sozobon, Pure C
and Gnu C. Retrieve it from http://arnaud.bercegeay.free.fr/gemlib/
or from http://http://sparemint.atariforge.net/sparemint/.
Compiling:
You just have to include the WinDom header file in your source files
:
#include <windom.h>
For compiling and linking with Sozobon and Gcc use the following
makefile :
# Makefile for compiling with Gcc or Sozobon
CC = gcc # for Gcc user
CC = cc # for Sozobon user
CFLAGS = -O
LDFLAGS = -lwindom -lmgem
# eof
Pure C Project file :
;; Pure C projet file (standard)
windom.lib
gem.lib
pcstdlib.lib
pctoslib.lib
Recompiling the library:
In the following part, '% ' designs the prompt of your shell
interpreter.
- unzip the windom package in a folder and keep only the
folders src and include :
% unzip wndm0109.zip -d windom
% cd windom/src
- evntually, edit options.h and change some compilation
options.
- With Pure C, use the project file windom.prj to compile
WinDom.
- With other compilers (gcc, sozobon), you have to use a
shell interpreter (tcsh, mupfel, ...) and use a make or gmake
program. You have to choice between GEMLIB (pl40) and MGEMLIB
(pl39).
- With Gcc 2.8.1, adapte the makefile m_gcc281 to your
environnement or sets the following environnement variables :
- CC_GCC281 to 'gcc' or complete path of gcc if it is
not defined in your PATH variable,
- AR_GCC281 to 'ar' or complete path of ar if it is not
defined in your PATH variable,
- GNUINC to the path of gcc include folder,
- GNULIB to the path of gcc lib folder.
- With Gcc 2.9.5, compiler uses standard unix hierarchy ie
/usr/include, /usr/lib and /usr/GEM/include. If your
environnement, is different, adapte the makefile m_gcc to your
environnement.
- With Sozobon X, adapte the makefile m_sox to your
environnement or sets the following environnement variables :
- CC_SOX to 'cc' or complete path of cc if it is not
defined in your PATH variable,
- AR_SOX to 'ar' or complete path of ar if it is not
defined in your PATH variable,
- SOXINC to the path of sozobon include folder,
- SOXLIB to the path of sozobon lib folder.
- SOXBIN to the path of sozobon bin folder.
- type make in the shell. It returns :
Targets are gcc, gcc281, soz :
make gcc : compile for gcc 2.9.5 (for MiNT with an Unix file system hierarchy)
make gcc281 : compile for gcc 2.8.1 ( for other systems)
make soz : compile for Sozobon X
So select your target and start the compilation.