Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
where is GMain and ...
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-10-06 (21:04)
From: Jeremy O'Donoghue <jeremy.odonoghue@g...>
Subject: Re: [Caml-list] where is GMain and ...
Hi Karimi,

On 06/10/05, Rasool Karimi <> wrote:
> My previous problem is solved. I had forgotten to install "asm" program!.
> Now I have another problem. When I Compile my program, at end of
> compilation, it reports an error that can not find following files:
>   GMain referenced from term.cmx
>   Winfo referenced from functions.cmx
>   GBin referenced from term.cmx
>   GButton referenced from term.cmx
>   GtkText referenced from term.cmx
>   Glib referenced from term.cmx

This looks as though it is Lablgtk2, which is probably the bset
supported Ocaml GUI at the moment (although it may be the older
Lablgtk - the documentation of the program you're trying to compile
should make this clear).

Your first message suggests that you are compiling for Windows, which
means that you're in for a tough ride. Lablgtk2 is an Ocaml binding
for Gtk 2.x, which is a popular Linux/Unix widget set. There is a
Windows port, but it is quite painful to install (I should know, I did
it a couple of weeks back...)

Go to and
download lablgtk-2.4.0.tar.gz. Note that you cannot use the Windows
binary package if you want to compile with ocamlopt.

Unzip and untar, and read README and (especially) README.win32 carefully.

Go to and download
the required binary installer packages (there are a lot of them). You
will need both runtime and developer files.

Install these somewhere sensible. I would strongly recommend that you
ensure that you don't have any spaces in the directory path (I used
c:\libs\gtk2 - definitely avoid c:\Program Files\...), and ensure that
your path environment variable points to the installed Gtk+ library

Now follow the build instructions for Lablgtk2 carefully.

I use the word carefully rather often as the install worked perfectly
for me, but only after several false starts where I tried to cut

If you are building on Linux or another Unix system, it is likely that
the Gtk+ libraries are already installed. If they are not, then they
should be much easier to get and iinstall than for Windows.

Good luck!