简体   繁体   中英

Unbound module Camlp4

I am aware of similar questions on this site but none of them have helped to solve my problem.

I am very new at OCaml and am using the following tutorial about using Camlp4 https://github.com/ocaml/camlp4/wiki/OCaml_code_generation_tutorial

However I get an error on the first line: open Camlp4.PreCast saying "Unbound module Camlp4"

There is a camlp4.exe file where I have downloaded OCaml so I assumed it was installed. I have tried this both on Windows 8 and Xubuntu

This is the input I am passing to the command line to compile the file: ocamlc -o test.exe test.ml where test.ml is the file that contains the line with the error

You should know that camlp4 is deprecated, you should use ppx instead.

If you need to compile an old programs using camlp4, they should have instructions on how to build. Anyway it's very rare to use ocamlc directly, you should try ocamlbuild or at least use ocamlfind .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM