Simple compilation: ocamlc main.ml && ./camlprog cmd /c "(ocamlc main.ml) && camlprog.exe" Libraries: ocamlfind ocamlc -linkpkg -package str main.ml && ./camlprog cmd /c "(ocamlfind ocamlc -linkpkg -package str main.ml) && camlprog.exe"