简体   繁体   中英

Unbound Module GWindow

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM