English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2010-01-23 (08:27)
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 main.ml
ocamlc -o myprog str.cma main.ml

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 main.ml

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