Installation

kForth is provided under the terms of the GNU General Public License. New releases of this software will be posted at the CCRE website, as they become available. Online documentation is also available at the website. Difficulties with installation should be reported to: krishna.myneni@ccreweb.org

kForth is distributed as a compressed tar (Unix Tape Archive) file ( kflnx10.tar.gz for the Linux version and kfwin10.tar.gz for the Windows version). This file contains the source code files and a Makefile for building the executable. Windows users may also simply download the file kfwin10.zip if they only want to execute kForth.

Installation under Linux

  1. As root user, create a directory for kforth under /usr/local/src, e.g.

    mkdir /usr/local/src/kforth


    and move the archive file kflnx10.tar.gz into this directory,

    mv kflnx10.tar.gz /usr/local/src/kforth


  2. Change to the kforth source directory,

    cd /usr/local/src/kforth


    and extract the source files using the command

    tar -zxvf kflnx10.tar.gz


  3. Along with the extracted source files, there will also be a Makefile in the directory. Type

    make


    to generate the executable. The GNU assembler, C, and C++ compilers must be installed on your system. In addition, the readline and ncurses libraries must be present on your system.

  4. The executable, named kforth will be generated. Move the executable to the directory /usr/local/bin in order to put it in a path available to users,

    mv kforth /usr/local/bin


  5. Sample source code files are included in the archive. These files have extension .4th. Users may copy the example programs to their own directories.

  6. You may specify a default directory in which kforth will search for .4th files not found in the current directory. The environment variable KFORTH_DIR must be set to this directory. For example, under the BASH shell, if you want the default directory to be /usr/local/src/kforth, add the following lines to your .bash_profile file:

    	KFORTH_DIR=/usr/local/src/kforth
    	export KFORTH_DIR
    


  7. The file kforth.xpm may be used to create a desktop icon for kForth under X Windows. For example, if you are using the KDE environment, copy kforth.xpm to the /usr/share/icons directory.



Installation under Windows

The Cygwin development tools must be installed on your Windows system to rebuild the executable starting from the source code. If you do not wish to build kForth from scratch, simply download the distribution file kfwin10.zip and unzip the contents into the desired directory. The zip file contains the executable kforth.exe, the required dynamic link libraries cygwin1.dll, cygncurses5.dll, cygreadline4.dll, and sample kForth programs.

Follow these steps to build kForth from scratch on your Windows system:

  1. Start the Cygwin BASH shell.

  2. Create a directory for the kForth source files, typically in the /usr/local/src directory, e.g.

    mkdir /usr/local/src/kforth


  3. Move the kForth archive file kfwin10.tar.gz into this directory:

    mv kfwin10.tar.gz /usr/local/src/kforth


  4. Change to the /usr/local/src/kforth directory and extract the files:

    	cd /usr/local/src/kforth
    	tar -zxvf kfwin10.tar.gz
    


    After this step, the directory should contain all of the kforth source files, the Makefile, and a README file containing these instructions.

  5. Build the kForth executable. There are several options for building kForth, but the simplest is to type:

    make


    All of the source files will be compiled/assembled and the executable file, named kforth.exe, will be generated.

  6. Move the executable to the desired directory.

  7. Sample source code files, with the extension .4th, are included in the archive file. These files are inteded to serve as programming examples for kForth.

  8. If you will be running kForth from the Cygwin BASH shell, you may specify a default directory in which kForth will search for .4th files not found in the current directory. The environment variable KFORTH_DIR must be set to this directory. For example, under the BASH shell, if you want the default directory to be /usr/local/src/kforth, add the following lines to your .bash_profile file:

    	KFORTH_DIR=/usr/local/src/kforth
    	export KFORTH_DIR
    


  9. The file kforth.ico may be used to create a desktop icon for kforth under Windows.



    

Copyright © 1998--2001 Creative Consulting for Research and Education