Browse thread
[Caml-list] lablgtk newbie question
-
Richard Jones
- Richard Jones
- Eric C. Cooper
- Jacques Garrigue
- Benjamin Monate
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Benjamin Monate <monate@l...> |
| Subject: | Re: [Caml-list] lablgtk newbie question |
Richard Jones wrote:
>Why do I have to run lablgtk programs using the 'lablgtk' interpreter?
>What does this do above and beyond ordinary /usr/bin/ocaml?
>
>
It a very simple convenience wrapper which selects a good precompiled
toplevel with Gtk initialized.
You can get rid of it :
- for programs without threads, just start
ocaml -I +lablgtk2 lablgtk.cma gtkInit.cmo
- with threads :
ocaml -I +threads -I +lablgtk2 unix.cma threads.cma lablgtk.cma
gtkThread.cmo gtkInit.cmo gtkThInit.cmo
Replace lablgtk2 by lablgtk if you are a Gtk 1.* user.
>It kind of reminds me (in a not very happy way) of the old problems
>with Tcl/Tk where you needed to use a different version of 'wish' for
>each extension you compiled in. Tell me this is not the same thing ...
>
>
This is not the same thing :-)
Moreover you may prefer to compile your programs instead of using an
interactive toplevel.
Use
ocamlc -I +lablgtk2 lablgtk.cma gtkInit.cmo myfile.ml
to produce portable bytecode or even
ocamlopt -I +lablgtk2 lablgtk.cmxa gtkInit.cmx myfile.ml
to produce native code.
Cheers
Benjamin
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners