Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
difficulties using camlp4
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dominique Martinet <dominique.martinet@s...>
Subject: Re: [Caml-list] difficulties using camlp4
Hello Greg :)

Grégoire Seux wrote on Sat, Jan 23, 2010 at 11:48:10AM +0530 :
> I would like to use the Str module in a program so i should use camlp4

I don't see why using Str would imply using camlp4 ?

to compile a program using str, you should use either
ocamlopt -o myprog str.cmxa
ocamlc -o myprog str.cma

You're not linking to the str module, that's why the compiler complains
about undefined things.

That appart, you might want to try ocamlfind to manage modules for you,
if you have :
ocamlfind ocaml{c,opt} -linkpkg -package str -o myprog

It's useless for str alone, but can get in handy when you have alot of

And by the way, if you want to use camlp4 for regexps, you might want to
take a look at mikmatch :


Asmadeus | Dominique Martinet