From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id A85A6BC0B for ; Thu, 14 Dec 2006 14:10:32 +0100 (CET) Received: from smeltpunt.science.ru.nl (smeltpunt.science.ru.nl [131.174.16.145]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id kBEDAVkC005918 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Thu, 14 Dec 2006 14:10:32 +0100 Received: from tandem.cs.ru.nl [131.174.142.18] (helo=tandem.cs.ru.nl) by smeltpunt.science.ru.nl (8.13.7/5.10) with ESMTP id kBEDAVaR018759 for ; Thu, 14 Dec 2006 14:10:31 +0100 (MET) Received: from tews by tandem.cs.ru.nl with local (Exim 4.63) (envelope-from ) id 1GuqM3-0001zp-Iu for caml-list@inria.fr; Thu, 14 Dec 2006 14:10:31 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17793.19783.551299.652755@tandem.cs.ru.nl> Date: Thu, 14 Dec 2006 14:10:31 +0100 To: caml-list@inria.fr Subject: compiling ocaml into a shared object X-Mailer: VM 7.19 under Emacs 21.4.1 From: Hendrik Tews X-Scanned-By: MIMEDefang 2.56 on 131.174.16.145 X-Miltered: at concorde with ID 45814D48.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 hendrik:01 tews:01 tews:01 ocaml:01 dlopen:01 ocamlopt:01 -output-obj:01 dlopen:01 -shared:01 ocamlopt:01 -output-obj:01 hendrik:01 compile:01 caml-list:01 Hi, could somebody tell me how to compile ocaml sources into a shared object that can be loaded with dlopen? The following message seems to tell me that this is possible: http://caml.inria.fr/pub/ml-archives/caml-list/2001/12/e2092b52999522eaa0bbc099b07cf4e1.en.html I tried ocamlopt -output-obj -o ocaml-dlex.so dlex.ml but on dlopen ("/home/tews/src/ocaml/ocaml-dlex.so", RTLD_LAZY); I get dlopen error: /home/tews/src/ocaml/ocaml-dlex.so: only ET_DYN and ET_EXEC can be loaded Passing -ccopt -shared to ocamlopt changed nothing. In fact it seems that -output-obj discards all -ccopt options! Bye, Hendrik