From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 D43BDBCAC for ; Tue, 24 May 2005 08:38:18 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j4O6cIuP009689 for ; Tue, 24 May 2005 08:38:18 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id IAA26638 for ; Tue, 24 May 2005 08:38:17 +0200 (MET DST) Received: from smtp805.mail.sc5.yahoo.com (smtp805.mail.sc5.yahoo.com [66.163.168.184]) by nez-perce.inria.fr (8.13.0/8.13.0) with SMTP id j4O6cGr0022849 for ; Tue, 24 May 2005 08:38:17 +0200 Received: from unknown (HELO ?192.168.1.100?) (rftp@pacbell.net@63.194.18.166 with plain) by smtp805.mail.sc5.yahoo.com with SMTP; 24 May 2005 06:38:15 -0000 Message-ID: <4292CC39.1020405@rftp.com> Date: Mon, 23 May 2005 23:39:53 -0700 From: Robert Roessler Organization: Robert's High-performance Software User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jacques Garrigue Cc: Caml-list Subject: Re: [Caml-list] ocamlopt and *using* DLLs References: <4292A58D.207@rftp.com> <20050524.132951.104054009.garrigue@mailhost.math.nagoya-u.ac.jp> In-Reply-To: <20050524.132951.104054009.garrigue@mailhost.math.nagoya-u.ac.jp> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 4292CBDA.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 4292CBD8.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocamlopt:01 dlls:01 beginners:01 ocamlopt:01 ocamlc:01 ocaml:01 libs:01 dlls:01 lablgtk:01 runtime:01 cmo:01 cmx:01 cmxa:01 ocamlrun:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: Jacques Garrigue wrote: > From: Robert Roessler > >>I tried this on the beginners list, but may not have been asking the >>right question(s)... :) > > > Doesn't look like a beginner question... I had been hoping that the ocamlopt manual was not wrong, and that I was just missing something... simple. :) >>2b) can I in general expect that an app that works well with ocamlc >>and a collection of OCaml cma libs and compiled DLLs (LablGTK and >>associated runtime) will work with ocamlopt - assuming that I generate >>and replace cmo/cma files with cmx/cmxa files? > > > Except these linking problems, you can assume identical behaviour. > If there are significant discrepancies, please report them. Actually, it looks like Nicolas brings up a large conceptual difference... I was at first tempted to say that his points about ocamlrun.dll did not apply to my case, but then I realized that my DLL, while primarily concerned with interfacing between OCaml and the C-land Scintilla editing widget, does in fact call on the OCaml runtime for things like string and tuple allocation. Put a different way, ml_scintilla.dll definitely has a dependence on ocamlrun.dll - which logical need would not go away even if I repackaged the DLL as a static lib. So, where (in both a conceptual as well as linking-specific terms) do I find the hooks (caml_alloc_string, caml_alloc_tuple, caml_named_value etc) into the OCaml runtime when it is embedded in my ocamlopt-generated executable? Robert Roessler roessler@rftp.com http://www.rftp.com