| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 1.91

Installing The SFL

Availability and Distribution

We supply the SFL as two archives: a source kit and a documentation kit (in HTML). These files are available for download by HTTP from our website on a permanent basis. You need to recompile the SFL for your specific system, using an ANSI C compiler. We don't provide binary kits (as yet) for several reasons:

Getting The Source Archive

The SFL source archive is supplied as a zip file and a GNU gzip+tar file. These are the files in the /pub/sfl/src directory:

sflsrc18.tgz    304586 98/04/11 17:10:24  Gzip/tar archive
sflsrc18.zip    372567 98/04/11 17:10:24  ZIP archive
sflsrc19.tgz    308676 98/04/23 22:02:24  Gzip/tar archive
sflsrc19.zip    378833 98/04/23 22:02:24  ZIP archive

If you have trouble accessing the iMatix site, send us an e-mail and we'll send you the SFL archives by return e-mail, using the uuencode format.

Getting The The Documentation Kit

The SFL documentation is supplied as HTML files, available on-line or off-line as a single .zip file that you can install on a hard disk for rapid access, and also as a GNU gzipped file. These are the files in the /pub/sfl/doc directory:

sflbig18.tgz    155117 98/04/11 17:10:26  Gzip/tar archive
sflbig18.zip    156189 98/04/11 17:10:26  ZIP archive
sflbig19.tgz    184590 98/04/23 22:02:28  Gzip/tar archive
sflbig19.zip    184251 98/04/23 22:02:28  ZIP archive
sfldoc18.tgz    190286 98/04/11 17:10:26  Gzip/tar archive
sfldoc18.zip    464103 98/04/11 17:10:24  ZIP archive
sfldoc19.tgz    217199 98/04/23 22:02:26  Gzip/tar archive
sfldoc19.zip    544018 98/04/23 22:02:26  ZIP archive

We recommend that you unzip or gunzip/detar the archive into a subdirectory. Point your browser at the index.htm file. We use relative addressing in all HTML documents, so that links work just as well on a local hard-disk as on-line on our website. In a windowing environment is it easy and useful to create an icon that runs a Web browser on this file.


Installation for UNIX Systems

To install the SFL on a UNIX system you need to:

  1. Download the source archive and decompress it.
  2. Run the 'build' script to compile the SFL sources and build the libsfl.a archive file.
  3. Optionally, install the libsfl.a file in the /usr/lib directory.
  4. Optionally, install the SFL header file(s) in the /usr/include directory.

Decompressing The Source Archive

To unzip the source .zip file, you need the Infozip unzip tool:

$ mkdir temp
$ mv sflsrc19.zip temp
$ cd temp
$ unzip -a sflsrc19

To decompress the source .tgz file you need GNU gzip/gunzip and tar:

$ mkdir temp
$ mv sflsrc19.tgz temp
$ cd temp
$ gzip -d sflsrc19.tgz
  or
$ gunzip sflsrc19.tgz
$ tar -xvf sflsrc19.tar

You can also, in extreme cases, unzip the files on a PC and transfer the individual files to the UNIX system.

Compiling The SFL Sources

The SFL source archive includes a script, c, that you can (and should) use to compile the SFL sources. This script invokes the ANSI C compiler to produce an object code file. It detects the platform and invokes the compiler with the necessary switches for ANSI C compilation. On some systems this is the normal behaviour for the cc command. On other systems it is not normal. You should make the c script executable, (preferrably) install it in a shared directory like /usr/local/bin, and try it out:

$ chmod a+rx c
$ mv c /usr/local/bin
$ c

To compile the SFL sources, use this command:

$ chmod +x build
$ build

If you get warnings or error messages, this is usually a bad sign. Some compilers issue warnings just because you ask for ANSI compilation. If you get any other error messages, please let us know.

You can use individual SFL files simply by specifying them on the command line when you compile and link a program. However, this is usually a pain. Therefore, the build script creates a library file called libsfl.a. The linker can automatically search this file for the SFL functions. To install libsfl.a in the /usr/lib directory, do this:

$ mv libsfl.a /usr/lib

Using The SFL In Your Applications

To use an SFL function in your applications you must include a header file that defines the structures, prototypes, and types for the function API. The SFL provides three types of header files:

  1. One header file per function group. These are provided for reference; you will normally not use these directly.
  2. A Universal Header File which encapsulates and replaces all local header files. Again, this is provided for reference; you do not normally use this directly.
  3. A Library Header File that contains the Universal Header File and all the SFL header files in one go. This is meant to simplify application programming and installation.

We recommend that you install the sfl.h file in /usr/include. A typical application program starts like this:

#include <sfl.h>

To link an application program, use the c -l command. This assumes that libsfl.a is installed /usr/lib.


Installation for Digital VMS Systems

To install the SFL on a Digital VMS system you need to:

  1. Download the source archive and decompress it.
  2. Run the 'build.txt' command file to build the libsfl.olb library file.
  3. Optionally, install the libsfl.olb file in the SYS$LIBRARY directory.
  4. Optionally, install the SFL header file(s) in the SYS$LIBRARY directory.

Decompressing The Source Archive

To unzip the source .zip file, you need the Infozip unzip tool (note that you need the -a switch):

$ create/dir [.temp]
$ ren sflsrc19.zip [.temp]
$ set def [.temp]
$ unzip -a sflsrc19

You can also, in extreme cases, unzip the files on a PC and transfer the individual files to the VMS system.

Compiling The SFL Sources

To compile the SFL sources, use this command:

$ @build.txt

If you get warnings or error messages, this is a bad sign - please let us know.

The build.txt command file creates a library file called libsfl.olb. You can install this in a central directory like SYS$LIBRARY if you wish. You'll need system privileges to do this.

Using The SFL In Your Applications

To use an SFL function in your applications you must include a header file that defines the structures, prototypes, and types for the function API. The SFL provides three types of header files:

  1. One header file per function group. These are provided for reference; you will normally not use these directly.
  2. A Universal Header File which encapsulates and replaces all local header files. Again, this is provided for reference; you do not normally use this directly.
  3. A Library Header File that contains the Universal Header File and all the SFL header files in one go. This is meant to simplify application programming and installation.

We recommend that you install the sfl.h file in SYS$LIBRARY. A typical application program starts like this:

#include <sfl.h>

Installation for Windows

Briefly, either create a static library, and include that in your project; create a .DLL and call that, or add the files you want to use to your project and compile them as part of the application.

With MSVC 4.0, we find it useful to create a main project for the application in hand, and a subproject for the SFL. We build the SFL as a static library. If you use MFC, you must compile everything (including MFC) in single-threaded mode, and use libd.

Under MSVC 1.5x, there is a bug in the project manager that generates invalid make files: the SFL prelude.h file refers to various non-Windows include files, within #if statements. The MSVC 1.5x project manager includes these in the make file; you must manually remove them. One solution is to edit prelude.h; another is to use a Perl or Awk script to edit the make file each time you change the project. You could also move to a different 16-bit compiler. Finally, you can create the make files as empty files in the C include directory.


Installation for MS-DOS

To install the SFL on a MS-DOS system you need to:

  1. Download the source archive and decompress it.
  2. Run build.bat to build the libsfl.lib library file.
  3. Optionally, install the libsfl.lib file in central directory.
  4. Optionally, install the SFL header file(s) in a central directory.

Decompressing The Source Archive

To unzip the source .zip file, you need the Infozip unzip tool, or PKzip version 2.04g or later, or a compatible unzip program.:

C:\DOWNLOAD> md temp
C:\DOWNLOAD> copy sflsrc19.zip temp
C:\DOWNLOAD> del sflsrc19.zip
C:\DOWNLOAD> cd temp
C:\DOWNLOAD> unzip sflsrc19

Compiling The SFL Sources

These build scripts are provided for MS-DOS:

The build scripts create a library file called libsfl.lib. You can install this, and sfl.h, in a central directory if you wish.

Using The SFL In Your Applications

To use an SFL function in your applications you must include a header file that defines the structures, prototypes, and types for the function API. The SFL provides three types of header files:

  1. One header file per function group. These are provided for reference; you will normally not use these directly.
  2. A Universal Header File which encapsulates and replaces all local header files. Again, this is provided for reference; you do not normally use this directly.
  3. A Library Header File that contains the Universal Header File and all the SFL header files in one go. This is meant to simplify application programming and installation.

We recommend that you install the sfl.h file in the /include directory of your compiler. A typical application program starts like this:

#include <sfl.h>

| << | < | > | >> iMatix Copyright © 1996-98 iMatix