INSTALL - Build instructions for WDialog

INSTALL - Build instructions for WDialog

Build instructions for the WDialog core

The following text describes how to compile and install the core of WDialog. Later you will find instructions for the Perl bindings.


You should now be able to compile WDialog.


There is a configure script in the distribution. If you only want to make the Caml library, just call


and see what it finds out. You can get a list of all options by running

./configure -help

However, options are normally not necessary because the tool findlib provides an automatic way to locate the prerequisites.

For the Perl bindings, you also have to specify -with-perl, and you must pass the path of the directory ocaml-3.04 containing the Caml sources:

-ocamltree /path/to/ocaml-3.04

Furthermore, you can specify a directory that will contain dynamically loaded libraries (default is /usr/local/libexec/wdialog):

-perl-libdir /path/to/dir


To make the bytecode version of the libraries and the tools, run

make all

from the top-level directory of the distribution. If you have ocamlopt, the native-code compiler, you can additionally run

make opt

and compile Wdialog to native machine code. It is not possible to leave the bytecode libraries out.

If you have configured the Perl bindings, these will not be made by one of these commands!


Now run

make install

to install one or both versions of the libraries and tools. You may wonder where they are installed. This is determined by findlib, and you can run

ocamlfind printconf

to view the configuration of findlib. Look under "Packages will be installed in/removed from:". This directory will contain a subsdirectory for every major part that is installed (wdialog, wdialog-p4, wdialog-perlguts, wd-xmlcompiler, ocamlrun-dso, potentially more). "make install" is quite verbose, so just look at its output to get the details.


If you are totally disappointed, you can get rid of WDialog by removing all parts:

make uninstall

- or by running

ocamlfind remove name-of-part

for the individual parts.

Build instructions for the Perl Bindings



Just enter

make perlapi

This will create a directory hierarchy under src/UI/blib.



make install-perlapi

to install it as Perl package. Furthermore, this command installs a number of O'Caml stub libraries into the -perl-libdir directory, in addition to the libraries that can already be found there. The Perl modules are dependent on these libraries, so make sure this directory is available when running Perl programs. The Perl installation is independent of the O'Caml installation.

Special instructions for camlidl (1.02)

Important: Version 1.04 of camlidl does not work (yet).

After unpacking the tar archive, do:

cd config
cp Makefile.unix Makefile

Edit the Makefile, and set the following variables properly: OCAMLLIB (to the output of "ocamlc -where"), BINDIR (where the tool camlidl will be installed; in doubt use the same directory as for "ocamlc").

Create a file runtime/dummies.c with the one-line contents:

int IID_IUnknown;

Change the "OBJS=" line in runtime/Makefile.unix to

OBJS=idlalloc.o comintf.o comerror.o dummies.o

You can now do (in the top-level directory of the distribution):

make all

- but this does not suffice, because this only builds the static version of the library. Do:

cd runtime
ocamlmklib -o camlidl idlalloc.o comintf.o comerror.o dummies.o
cd ../lib
ocamlmklib -o com -oc camlidl com.cmo
ocamlmklib -o com -oc camlidl com.cmx

Installation: Go back to the top-level directory, and create a file called META with the following contents:

requires = ""
version = "1.02"
directory = "^"
browse_interfaces = "Com"
archive(byte) = "com.cma"
archive(native) = "com.cmxa"

Install with

make install

(installs in the standard library directory of Caml), followed by

(O'Caml 3.04:) cp runtime/ $OCAMLLIB
(O'Caml 3.06:) cp runtime/ $OCAMLLIB/stublibs

(replace $OCAMLLIB by the path you entered in the Makefile), followed by

ocamlfind install camlidl META

such that findlib knows about camlidl.