ocamlc Unbound module Cil - Cant compile ocaml CIL code


Do not use make clean when installing cil-1.3.7 (it removes cil.cmi and everything else from cil-1.3.7/obj/x86_LINUX/).

Now try compilation again with -I ../cil-1.3.7/obj/x86_LINUX/

ocamlc Unbound value xxx


Put file containing xxx before file which uses it. E.g.
ocamlc -I ../cil-1.3.7/obj/x86_LINUX/ reachingEx.ml entry.ml

ocamlc Error while linking reachingEx.cmo:
Reference to undefined global `Reachingdefs'


add cil.cma (or, if using ocamlopt, cil.cmxa) before your files.

Reference to undefined global `Unix'


add str.cma unix.cma (or, if using ocamlopt, str.cmxa cil.cmxa) before your files. You probably need str as well as unix.

The command line is now:

ocamlc -I ../cil-1.3.7/obj/x86_LINUX/ str.cma unix.cma cil.cma reachingEx.ml entry.ml
which produces an executable a.out file

Solutions by Kiran

emacs mode for Ocaml

Add (setq save-abbrevs nil) to your .emacs
Created 8 Jun 2010 by W.Langdon