Frage

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

War es hilfreich?

Lösung

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
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top