From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 6FEABBBAF for ; Sat, 23 Jan 2010 09:27:14 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AswBAN5BWkuKwyEYmWdsb2JhbACDYpg8AQEBAQEICwoHE6tAjwuBLII2WQQ X-IronPort-AV: E=Sophos;i="4.49,329,1262559600"; d="scan'208";a="42031904" Received: from leopard.ecp.fr ([138.195.33.24]) by mail2-smtp-roc.national.inria.fr with ESMTP; 23 Jan 2010 09:27:14 +0100 Received: from localhost (localhost [127.0.0.1]) by leopard.ecp.fr (Postfix) with ESMTP id D23B637CA0 for ; Sat, 23 Jan 2010 09:27:13 +0100 (CET) Received: from leopard.ecp.fr ([127.0.0.1]) by localhost (leopard [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 11049-08 for ; Sat, 23 Jan 2010 09:27:13 +0100 (CET) Received: from kami.via.ecp.fr (kami.via.ecp.fr [138.195.146.147]) by leopard.ecp.fr (Postfix) with ESMTP id C48E737C9E for ; Sat, 23 Jan 2010 09:27:13 +0100 (CET) Received: by kami.via.ecp.fr (Postfix, from userid 1000) id BDDFCC15475; Sat, 23 Jan 2010 09:27:13 +0100 (CET) Date: Sat, 23 Jan 2010 09:27:13 +0100 From: Dominique Martinet To: caml-list Subject: Re: [Caml-list] difficulties using camlp4 Message-ID: <20100123082713.GB15169@via.ecp.fr> References: <1ae8fe881001222218o529e11b0x60f5a246a982cf2a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1ae8fe881001222218o529e11b0x60f5a246a982cf2a@mail.gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at ecp.fr X-Spam: no; 0.00; martinet:01 martinet:01 camlp:01 camlp:01 ocamlopt:01 myprog:01 cmxa:01 ocamlc:01 myprog:01 compiler:01 appart:01 ocamlfind:01 ocamlfind:01 ocaml:01 -linkpkg:01 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 or 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 dependancies. And by the way, if you want to use camlp4 for regexps, you might want to take a look at mikmatch : http://martin.jambon.free.fr/mikmatch-manual.html Regards, Asmadeus | Dominique Martinet