From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id BF3CFBBBB for ; Tue, 24 Jan 2006 21:58:36 +0100 (CET) Received: from mail.enyo.de (mail.enyo.de [212.9.189.167]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k0OKwZRS013661 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Tue, 24 Jan 2006 21:58:36 +0100 Received: from deneb.vpn.enyo.de ([212.9.189.177] helo=deneb.enyo.de) by mail.enyo.de with esmtp id 1F1VFL-00062u-B1 for caml-list@yquem.inria.fr; Tue, 24 Jan 2006 21:58:35 +0100 Received: from fw by deneb.enyo.de with local (Exim 4.60) (envelope-from ) id 1F1VFK-0001N4-Bf for caml-list@yquem.inria.fr; Tue, 24 Jan 2006 21:58:34 +0100 From: Florian Weimer To: caml-list@yquem.inria.fr Subject: ocamlopt -a and module order Date: Tue, 24 Jan 2006 21:58:34 +0100 Message-ID: <87fynd737p.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Miltered: at nez-perce with ID 43D694FB.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocamlopt:01 ocamlopt:01 link-time:01 initialized:01 topological:01 cyclic:01 modules:01 modules:01 florian:02 seems:03 module:03 module:03 explicit:03 library:03 sort:11 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 When creating libraries using ocamlopt -a, it seems that it is necessary to give the modules on the command line in such an order that all inter-module references are to modules which precede on the command line. Otherwise, I get link-time errors when using the library. In my case, there are no cyclic module references, and there is no requirement that the modules are initialized in a particular order (beyond that what is implied by explicit references), so a simple topological sort could come up with a proper ordering. Is there some way to have ocamlopt do this for me?