From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA06994; Thu, 5 Aug 2004 20:33:28 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA08304 for ; Thu, 5 Aug 2004 20:33:27 +0200 (MET DST) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.83]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i75IXQRM012071 for ; Thu, 5 Aug 2004 20:33:26 +0200 Received: from mac.com (smtpin07-en2 [10.13.10.152]) by smtpout.mac.com (8.12.6/MantshX 2.0) with ESMTP id i75IXPkN008762 for ; Thu, 5 Aug 2004 11:33:25 -0700 (PDT) Received: from [192.168.1.100] (clt25-68-102.carolina.rr.com [24.25.68.102]) (authenticated bits=0) by mac.com (Xserve/smtpin07/MantshX 4.0) with ESMTP id i75IXOQ4017207 for ; Thu, 5 Aug 2004 11:33:25 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v618) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; format=flowed To: caml-list@inria.fr From: Michael Benfield Subject: [Caml-list] start execution in c code with dynamic linking? Date: Thu, 5 Aug 2004 14:33:25 -0400 X-Mailer: Apple Mail (2.618) X-Miltered: at concorde with ID 41127D76.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; dynamically:01 ocamlc:01 ocamlc:01 ocamlopt:01 usr:01 ocamlopt:01 bin:01 compiler:01 ocaml:01 ocaml:01 native:02 linking:02 linking:02 dynamic:03 dynamic:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk The OCaml manual states that execution will start with C code rather than OCaml code if the C code has a main() function. This happens with static linking, but not with dynamic linking. I realize it may be a strange thing to want, but is there any way to make that happen with dynamic linking? Also, is it not possible to dynamically link with the native code compiler? The OCaml Manual seems to concentrate almost entirely on ocamlc. $ ocamlc dlltry_.so try.ml $ ocamlopt dlltry_.so try.ml /usr/local/bin/ocamlopt: don't know what to do with dlltry_.so. ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners