From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q2JKihRX009713 for ; Mon, 19 Mar 2012 21:44:43 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgsFAICZZ0/VuiYS/2dsb2JhbABBhHFWsRmBB4IKAQUMF1YQCQIaAiYCAjwbBhOIDqxIihwTgRyOIIEWBJVnkCmCZw X-IronPort-AV: E=Sophos;i="4.73,611,1325458800"; d="scan'208";a="150214041" Received: from solaria.dimino.org ([213.186.38.18]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 19 Mar 2012 21:44:38 +0100 Received: from aurora (AToulouse-552-1-27-46.w92-134.abo.wanadoo.fr [92.134.102.46]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by solaria.dimino.org (Postfix) with ESMTPSA id DE07680053; Mon, 19 Mar 2012 21:44:37 +0100 (CET) Date: Mon, 19 Mar 2012 21:45:34 +0100 From: =?UTF-8?B?SsOpcsOpbWll?= Dimino To: Andre Nathan Cc: caml-list@yquem.inria.fr Message-ID: <20120319214534.33a8a89c@aurora> In-Reply-To: <1332182440.8276.8.camel@andre> References: <1332182440.8276.8.camel@andre> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id q2JKihRX009713 Subject: Re: [Caml-list] Building a camlp4 toplevel with oasis/ocamlbuild Le Mon, 19 Mar 2012 15:40:40 -0300, Andre Nathan a écrit : > $ ./ospec.byte > Fatal error: exception Symtable.Error("Printexc") > > Can anyone give me a hand here? It is because ospec has not be linked with the Printexc module. Since you define a library "ospec" and you use it for the executable "ospec", it will be linked against "ospec.cma", and not all the .cmo as you did before. OCaml remove unused units from ".cma" files passed on the command line when linking, it only keeps units reachable from ".cmo" files. Printexc has been removed because it was not used. To prevent this behavior you must pass the "-linkall" switch (note that you should always use it when you use dynlink). Cheers, -- Jérémie