user1959309
user1959309

Reputation: 101

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

Upvotes: 0

Views: 342

Answers (1)

Thomash
Thomash

Reputation: 6379

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.

Upvotes: -2

Related Questions