From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 84F78BB81 for ; Tue, 11 Apr 2006 22:37:22 +0200 (CEST) Received: from orion.metastack.com (no-dns-yet.demon.co.uk [80.177.38.218] (may be forged)) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k3BKbL5V027857 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 11 Apr 2006 22:37:22 +0200 Received: from dra27a (80-193-61-65.cable.ubr02.gill.blueyonder.co.uk [80.193.61.65]) (authenticated bits=0) by orion.metastack.com (8.13.4/8.13.3) with ESMTP id k3BKaGGN012207 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Tue, 11 Apr 2006 21:36:17 +0100 From: "David Allsopp" To: Subject: Re: [Caml-list] ocamlopt, windows, and no console Date: Tue, 11 Apr 2006 21:37:17 +0100 Organization: MetaStack Solutions Ltd. Message-ID: <003701c65da7$b986ab10$867ba8c0@dra27a> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Thread-Index: AcZdSXHOdUuH5KDpShSnPnofPpjBcgAKiXrwAA0EuGA= X-Miltered: at nez-perce with ID 443C1381.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocamlopt:01 iirc:01 byte:01 winmain:01 ocamlopt:01 ocaml's:01 compiler:01 lib:01 beginner's:01 ocaml:01 beginners:01 bug:01 2006:98 wrote:01 caml-list:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 One other option is to change the startup mode of the executable after compiling and linking it. I did this years ago with Visual Basic to make true console applications (the reverse of your problem). I can't find the code archive, but IIRC it involves changing a single byte in the PE header that indicates the subsystem to use. The concept of main and winmain come entirely from C - the actual entry point of your image is independent of its subsystem so this gets around your linking problem. I can't get at the machine with the archive of the tool I wrote for doing this at the moment . However, Microsoft have some utilities for doing this although I don't know whether they will only work for programs generated with their compiliers - google for Visual Basic's Link utility and MSVC++'s editbin tool. Hope this helps, David -----Original Message----- From: caml-list-bounces@yquem.inria.fr [mailto:caml-list-bounces@yquem.inria.fr] On Behalf Of Jonathan Roewen Sent: 11 April 2006 04:08 To: Dmitry Bely Cc: caml-list@inria.fr Subject: Re: [Caml-list] ocamlopt, windows, and no console > I guess I'd have to provide a .c file which wraps ocaml's main > procedure then, which probably isn't too hard. Which then leads me to > requesting an option for the ocamlopt compiler for windows to have an > option to do this all automatically. And back to the task at hand: how do I specify a .lib file on the command line to get this all to link? I can't figure out the cclib/ccopt options to pass to ocamlopt =/ Jonathan _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs