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 30A18BBC4 for ; Tue, 11 Apr 2006 11:00:09 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k3B2fIxU030448 for ; Tue, 11 Apr 2006 04:41: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 EAA19343 for ; Tue, 11 Apr 2006 04:41:18 +0200 (MET DST) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.205]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k3B2fHBV030445 for ; Tue, 11 Apr 2006 04:41:17 +0200 Received: by zproxy.gmail.com with SMTP id 4so924626nzn for ; Mon, 10 Apr 2006 19:41:17 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=iROUTRYBhCwZlAcNzqOvFn2eSgKw7dondcKck0Lyilob4kzcRJzLhBv3BesaYF9yxYYlYkL6GPQNsPwiHD235sWq6ZU0UU3j7g0+4Ednk9x1+s+LPmnHnqHSf9DCnJki9gSajr/waekhAeTQTYvYYdocB7H3Z0ZUCPDL5VJgpRo= Received: by 10.36.46.15 with SMTP id t15mr2127635nzt; Mon, 10 Apr 2006 19:41:16 -0700 (PDT) Received: by 10.36.121.13 with HTTP; Mon, 10 Apr 2006 19:41:16 -0700 (PDT) Message-ID: Date: Tue, 11 Apr 2006 14:41:16 +1200 From: "Jonathan Roewen" To: "Dmitry Bely" Subject: Re: [Caml-list] ocamlopt, windows, and no console Cc: caml-list@inria.fr In-Reply-To: <3bgljqhr.fsf@mail.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <3bgljqhr.fsf@mail.ru> X-Miltered: at nez-perce with ID 443B174E.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 443B174D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocamlopt:01 ocaml:01 mingw:01 msvc-based:01 -cclib:01 -cclib:01 winmain:01 ocamlopt:01 lablgl:01 cmxa:01 lablglut:01 cmxa:01 overriding:01 libcmt:01 lib: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.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 > What Ocaml build are you using? If Mingw one then I am afraid it's not > possible, but if it's MSVC-based I would try to play with > > -cclib /link -cclib /subsystem:windows > > options. Indeed I was scanning the options, and found those. The problem is that when you use that, you have to use WinMain instead... C:\reflection>ocamlopt -cclib "/MD /link /SUBSYSTEM:WINDOWS" -o refl.exe -I= +lab lgl lablgl.cmxa lablglut.cmxa refl.ml cl : Command line warning D4025 : overriding '/MT' with '/MD' LIBCMT.lib(wincrt0.obj) : error LNK2019: unresolved external symbol _WinMai= n@16 referenced in function _WinMainCRTStartup refl.exe : fatal error LNK1120: 1 unresolved externals Error during linking 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. Jonathan