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 38A2ABCAB for ; Fri, 27 May 2005 03:49:01 +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 j4R1n0A6032137 for ; Fri, 27 May 2005 03:49:00 +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 DAA24567 for ; Fri, 27 May 2005 03:49:00 +0200 (MET DST) Received: from smtp825.mail.sc5.yahoo.com (smtp825.mail.sc5.yahoo.com [66.163.171.11]) by nez-perce.inria.fr (8.13.0/8.13.0) with SMTP id j4R1mw15023263 for ; Fri, 27 May 2005 03:48:59 +0200 Received: from unknown (HELO ?192.168.1.100?) (rftp@pacbell.net@63.194.18.166 with plain) by smtp825.mail.sc5.yahoo.com with SMTP; 27 May 2005 01:48:58 -0000 Message-ID: <42967CEF.6000003@rftp.com> Date: Thu, 26 May 2005 18:50:39 -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: 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> <4292CC39.1020405@rftp.com> <005801c5602f$b786a070$0d05a8c0@PWARP> In-Reply-To: <005801c5602f$b786a070$0d05a8c0@PWARP> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 42967C8C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 42967C8A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocamlopt:01 dlls:01 cannasse:01 ocamlrun:01 lib:01 ocamlrun:01 bytecode:01 -custom:01 nativecode:01 bytecode:01 runtime:01 ocaml:01 api:01 makefile: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: Nicolas Cannasse wrote: >>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. > > > Actually the symbols are only imported from ocamlrun.dll if you compile-with > or define the CAML_DLL preprocessor variable. > If you don't have CAML_DLL defined, symbols will be resolved at linking > time, and will then be found in your executable. > So it's possible to have a staticly linked library in both bytecode > (with -custom) and nativecode. The proper use of CAML_DLL, along with your exposition on the differences between the bytecode and native runtime models was key to making this all work for me... but it is now. > You can have a look at the OCaml Win32 API library Makefile that have > different ways of building and linking it > (http://ocaml-win32.sourceforge.net/). This is actually funny - about a year and a half ago, when I was first looking at OCaml, I corresponded with Harry Chomsky and pointed out a bug in the makefile being distributed with this project - having to do with [not] defining CAML_DLL! :) I also contributed a small amount of code to the project, but ended up not being able to use the "OCaml Win32 API" because of the license. :( Robert Roessler roessler@rftp.com http://www.rftp.com