I guess you are using opam. If it's the case, you can use this compilation command:
$ ocamlc -I +../lablgtk2 -o base lablgtk.cma gtkInit.cmo base.ml
Question
I'm using FREEBSD with Emacs, Tuareg and GTK. Trying to create my first file but doesn't work.
base.ml:
(* file: base.ml *)
let main () =
let window = GWindow.window () in
window#show ();
GMain.Main.main ()
let _ = main ()
What I type to compile:
ocamlc -I +lablgtk2 -o base lablgtk.cma gtkInit.cmo base.ml
The error I get:
Error: Unbound module GWindow
Can anyone here help me?
This is my makefile:
OCAMLMAKEFILE = ../OCamlMakefile
SOURCES = base.ml
RESULT = base
PACKS = lablgtk2
THREADS = yes
include $(OCAMLMAKEFILE)
Thanks in advance
La solution
I guess you are using opam. If it's the case, you can use this compilation command:
$ ocamlc -I +../lablgtk2 -o base lablgtk.cma gtkInit.cmo base.ml