[Icon home]

Icon on Cygwin

Gregg M. Townsend
Department of Computer Science
The University of Arizona

www.cs.arizona.edu/icon/v943/cygwin.htm
Last updated November 8, 2005

Introduction

Most contemporary operating systems trace their underlying design to the Unix operating system, as refined and specified today by the POSIX family of standards. Microsoft Windows, however, was developed independently and defines a different set of interfaces for the programmer and the user.

The Cygwin package provides a Unix environment under Microsoft Windows. This allows the latest version of Icon (and many other things) to be built on a Windows system. Successful use of Cygwin requires familiarity with both Windows and Unix.

This document describes some of the peculiarities of the Cygwin port of Version 9.4 of Icon. These differences are not necessarily identified in other documentation.

Building Icon

The Cygwin package is available from www.cygwin.com. A custom installation of the Cygwin system is required; the default installation provides a bare-bones system insufficient for building software. Icon requires a C compiler and the usual tools and utilities available on a standard POSIX development system; these are found in the gcc-core and make packages. The xorg family of packages is also needed to build Icon with graphics enabled.

Icon is built in a Cygwin shell window. The process is the same as on other platforms and uses the configuration named cygwin. See the installation documentation for instructions on building Icon.

Running Icon programs

Icon is run by commands entered in a Cygwin terminal window. The simplest command is "icon prog.icn", which runs the program contained in the source file prog.icn. The translator icont can create executable programs from Icon source code. The Unix-style "man pages" for icon and icont describe the command options in a traditionally cryptic manner.

Interpreter path

Icon programs require an interpreter for execution. On Windows, the path of the interpreter is not embedded in an executable program. The program must be able to find iconx.exe in one of these locations:

Extra built-in functions

For compatibility with an earlier port of Icon to Windows, this implementation includes some extra built-in functions. The functions are described in section 6.2 of IPD271, which documents that earlier port.

These unsupported functions are not part of Icon on other platforms, so their use renders a program non-portable.

Feature test symbols

The symbols _MS_WINDOWS and _CYGWIN are defined by the Icon preprocessor. The symbol _GRAPHICS is defined if Icon is built with graphics enabled. The symbols _UNIX and _X_WINDOW_SYSTEM are not defined. The corresponding strings are produced or omitted, as appropriate, by the &features keyword.

No dynamic loading

The dynamic loading interface — loadfunc() — is not implemented.

Known bugs