mercredi 15 juin 2016

Difference between .cma, .cmo, .cmx files and how to use them correctly in compilation?


I am new to the OCaml and I'm confused with the file of .cma, .cmo and .cmx. Sometimes I have to include a .cma file in the compile command but sometimes I have to include a .cmo file.

Why is there a such difference for library? Is it the same concept in C++ as library and include path?

Example: ocamlc -o executable str.cma extstring.cmo mycode.ml

Thanks


Aucun commentaire:

Enregistrer un commentaire