wang kai
wang kai

Reputation: 1747

How to install package to use module Location?

I find a program use module Location,I use ocamlc to compile it,but got error:

Unbound module Location

I try this:opam install Location

got:No package named Location found

so how to use module Location ?

I found it's very hard and boring,the document is not good too,the doc

https://caml.inria.fr/pub/docs/manual-ocaml/libref/Location.html

do not tell me the package name that I need to use opam to install

so how to use module Location?thanks!

Upvotes: 0

Views: 143

Answers (1)

vonaka
vonaka

Reputation: 953

You can compile it with -package compiler-libs.common.

For example to compile Main.ml with the following content:

let () =
  print_string !Location.input_name

use this command:

ocamlbuild -package compiler-libs.common Main.native

Also check this.

Upvotes: 1

Related Questions