Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Camlp4 not work with ocamlc.
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Mike Potanin <potanin@m...>
Subject: [Caml-list] Camlp4 not work with ocamlc.

I make simple preprocesor, and it work:

bash$ ocamlc -a -o tr.cma -I /usr/local/lib/ocaml/camlp4 tr_lexer.cmo
tr_parser.cmo tr.ml
bash$ ocaml
        Objective Caml version 3.06

# #load "camlp4o.cma";;
	Camlp4s Parsing version 3.06

# #load "tr.cma";;
# <:tr_some<a-z/A-Z>> 'a';;
- : char option = Some 'A'
#

It is correct. But this command produce errors:

bash$ camlp4 pa_o.cmo ./tr.cma pr_o.cmo test.ml
Error while loading "./tr.cma": no implementation available for Tr_parser.
bash$ ocamlc -pp "camlp4o ./tr.cma" -c -I "`camlp4 -where`" test.ml
Error while loading "./tr.cma": no implementation available for Tr_parser.
Preprocessor error

How do fix it?

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners