ocs
An example for accessing these libraries can be found in
examples/Graphics/Queens. This is an animated version of
the 8-queens problem based on Opal's window library, which is in
turn based on Tcl/Tk. Compile with ocs and execute:
$ cd examples/Graphics/Queens
examples/Graphics/Queens $ ocs
-> Generating rules for queens'Queens ...
-> Checking Signature of Queens ...
-> Compiling Implementation of Queens ...
-> Generating object code for Queens ...
-> Generating startup code for queens ...
-> Linking queens ...
examples/Graphics/Queens $ ./queens
IfThe./queensfails because of missing shared libraries, useldd queensto check for these libraries in detail. Depending on the operation system, you may have to useldconfigor setLD_LIBRARY_PATHto solve the problem. In general, the Opal libraries are prelinked to contain a run-path pointing to "standard" locations ( e.g./usr/openwin/libfor the X11 library under Solaris).
SysDefs file for this example shows how Opal's window
library is included:
examples/Graphics/Queens $ cat SysDefs TOPSTRUCT = Queens TOPCOM = queens OPAL_LIBS = $(OPAL_WIN) $(OPAL_BASE)The variable
OPAL_LIBS consists of a sequence of
references to predefined variables describing library packages. In
version 2.3j, the following libraries are supported:
$(OPAL_WIN) - the
windows library
for GUI programming
$(OPAL_TK) - the
Tk library
$(OPAL_TCL) - the
Tcl library
for integrating Tcl interpreters into Opal programs
$(OPAL_READLINE) - the GNU readline command-line editing tool
(documentation)
$(OPAL_PARSERLIGHT) - a library for combinator parsing
(documentation)
$(OPAL_JAVA) - a type-safe interface to Java (documentation)
(prototype!)
$(OPAL_BASE) - the Opal standard library comprising
a large collection of types and functions:
Bibliotheca Opalica