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

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 for several reasons:

Getting The Source Archive

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

sflsrc20.tgz    383249 100/04/01 16:25:11  Gzip/tar archive
sflsrc20.zip    482192 100/04/01 16:25:01  ZIP archive
sflsrc21.tgz    332405 99/08/27 16:53:46  Gzip/tar archive
sflsrc21.zip    478117 99/12/30 14:08:19  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.

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 gzipped tar file. These are the files in the /pub/sfl/doc directory:

sflbig20.tgz    206059 100/04/01 16:25:14  Gzip/tar archive
sflbig20.zip    207473 100/04/01 16:24:54  ZIP archive
sflbig21.tgz    199270 99/08/27 16:53:48  Gzip/tar archive
sflbig21.zip    200592 99/08/27 16:53:31  ZIP archive
sfldoc20.tgz    254613 100/04/01 16:25:42  Gzip/tar archive
sfldoc20.zip    685112 100/04/01 16:24:53  ZIP archive
sfldoc21.tgz    246972 99/08/27 16:54:35  Gzip/tar archive
sfldoc21.zip    663278 99/08/27 16:53:30  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 sflsrc21.zip temp
$ cd temp
$ unzip -a sflsrc21

To decompress the source archive you need GNU gzip/gunzip and tar:

$ mkdir temp
$ mv sflsrc21.tgz temp
$ cd temp
$ gzip -d sflsrc21.tgz
  or
$ gunzip sflsrc21.tgz
$ tar -xvf sflsrc21.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 sflsrc21.zip [.temp]
$ set def [.temp]
$ unzip -a sflsrc21

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.

To build using the build.bat file with MSVC, you need to increase the environment space to (e.g. to 16K), and define some variables in the autoexec.bat file:

SET CCNAME=msvc
SET CCDIR=C:\MSDEVSTD
SET INCDEF=C:\MSDEVSTD\INCLUDE
SET LIBDIR=C:\MSDEVSTD\sfl\lib
Where the LIBDIR variable is the directory where you unzipped the SFL stuff.

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 sflsrc21.zip temp
C:\DOWNLOAD> del sflsrc21.zip
C:\DOWNLOAD> cd temp
C:\DOWNLOAD> unzip sflsrc21

Compiling The SFL Sources

To compile under MS-DOS you need a Borland, Microsoft, or Watcom compiler, or lcc-win32 or djgpp. Look at the c.bat file, and set the CCNAME and/or CCDIR environment variables as required. Then, check that you can compile a single program. e.g. 'c sflbits'. When this works, run the build.bat file to rebuild everything.

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-2000 iMatix Corporation