To compile: ocamlc -c fSet.mli ocamlc -c fSet.ml ocamlc -c main.ml ocamlc -o main fSet.cmo main.cmo OR ocamlc fSet.mli fSet.ml main.ml -o main -- makes the .cmi and .cmo files plus the binary Also there is a faster native code compiler (ocamlc generates bytecodes): ocamlopt fSet.mli fSet.ml main.ml -o main -- makes .cmx and .o files in place of .cmo files