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 XAA25569; Fri, 27 Feb 2004 23:50:50 +0100 (MET) 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 XAA26397 for ; Fri, 27 Feb 2004 23:50:49 +0100 (MET) Received: from rdcmx1.safeco.com (rdcmx1.safeco.com [12.144.132.31]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i1RMolae019209 for ; Fri, 27 Feb 2004 23:50:48 +0100 Received: from psmrdcex03.psm.pin.safeco.com (Not Verified[12.144.134.38]) by rdcmx1.safeco.com id ; Fri, 27 Feb 2004 14:50:46 -0800 Received: from safeco.com ([168.147.237.20]) by psmrdcex03.psm.pin.safeco.com with Microsoft SMTPSVC(5.0.2195.5329); Fri, 27 Feb 2004 14:50:43 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 MIME-Version: 1.0 Subject: [Caml-list] mingw dll hell Date: Fri, 27 Feb 2004 14:50:43 -0800 Message-ID: <9410EC84C0872141B27A2726613EF45D02A52CEA@psmrdcex01.psm.pin.safeco.com> Thread-Topic: mingw dll hell Thread-Index: AcP9hCFaO/IDi9r/Sni4egfuFHDJvA== From: "HENRIKSON, JEFFREY" To: X-OriginalArrivalTime: 27 Feb 2004 22:50:43.0943 (UTC) FILETIME=[21B38770:01C3FD84] content-class: urn:content-classes:message Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; mingw:01 henrikson:01 flags:01 cygwin:01 ocamlrun:01 crashes:01 gdb:01 henrikson:01 3.07:01 mingw:01 pcre:01 pcre-ocaml:01 gcc:01 pcre-ocaml-:01 pcre-ocaml-:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk This refers to my earlier post about dll trouble. I am having inconsistent dll linking behavior, though things are getting better as I futz with more flags. Again, three weeks ago all this same code and build scripts worked perfectly. One thing I seem to be noticing is that there are fewer errors if I do not link to libraries that depend on cygwin1.dll. Here is one case I do not understand. Under some builds I can ocamlrun an exe with success, but running the exe by itself crashes. (An exception is probably being thrown, but I can't see it.) Running under GDB runs successfully. How can this be? Jeff Henrikson -------------------------------- ocaml: 3.07pl2 mingw pcre: 4.4 pcre-ocaml: 5.04.3 gcc: 3.3.1 windows: 2000 jefhen@HOXPCXJEFHEN ~/src/pcre-ocaml-5.04.3/lib $ test jefhen@HOXPCXJEFHEN ~/src/pcre-ocaml-5.04.3/lib $ ocamlrun test.exe hello this12.3 is 2.78a t3st. 12 3 2 78 3 jefhen@HOXPCXJEFHEN ~/src/pcre-ocaml-5.04.3/lib $ test.exe jefhen@HOXPCXJEFHEN ~/src/pcre-ocaml-5.04.3/lib $ gdb test.exe GNU gdb 2003-09-20-cvs (cygwin-special) Copyright 2003 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-cygwin"...(no debugging symbols found)... (gdb) run Starting program: /cygdrive/c/src/pcre-ocaml-5.04.3/lib/test.exe hello this12.3 is 2.78a t3st. 12 3 2 78 3 Program exited normally. (gdb) quit jefhen@HOXPCXJEFHEN ~/src/pcre-ocaml-5.04.3/lib $ test.ml: output_string stdout "hello\n"; flush stdout; open Printf;; open Pcre;; let s =3D "this12.3 is 2.78a t3st.";; let r =3D regexp "([0-9]+)";; let a =3D extract_all ~full_match:false ~rex:r s;; printf "%s\n" s;; Array.iter (fun e -> printf "%s " e.(0)) a;; flush stdout; 0;; build commands: ocamlc -c pcre.mli -o pcre.cmi ocamlc -c pcre.ml -o pcre.cmo gcc -mno-cygwin -D__MINGW32__ -I c:\ocaml\lib -I/usr/include -I /usr/include/w32api -c pcre_stubs.c gcc -mno-cygwin -shared -L `ocamlc -where` -o dllpcre_stubs.dll -Wl,--out-implib,libpcre_stubs.a pcre_stubs.o -L . -lpcre-mingw `ocamlc -where`/ocamlrun.a Creating library file: libpcre_stubs.a Info: resolving _local_roots by linking to __imp__local_roots (auto-import) chmod 777 dllpcre_stubs.dll ocamlc -a -o pcre.cma pcre.cmo -dllib -lpcre_stubs ------------------- 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