From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id ECCE6BBAF for ; Sat, 28 Mar 2009 07:56:41 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAFZnzUnOe3NG/2dsb2JhbADOOYN3Bg X-IronPort-AV: E=Sophos;i="4.38,437,1233529200"; d="scan'208";a="23440990" Received: from spoomusic.com ([206.123.115.70]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 28 Mar 2009 07:56:41 +0100 Received: (qmail 9285 invoked by uid 89); 28 Mar 2009 06:56:39 -0000 Received: from unknown (HELO ?192.168.1.99?) (98.165.129.233) by 0 with ESMTPS (DHE-RSA-AES256-SHA encrypted); 28 Mar 2009 06:56:39 -0000 Message-ID: <49CDC9C5.9000603@ramenlabs.com> Date: Fri, 27 Mar 2009 23:55:01 -0700 From: Dave Benjamin User-Agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: Joel Reymont Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] ocaml + non-cygwin gtk+ on windows References: <33A277AE-5F1A-4E95-982A-559A6BB6D26F@gmail.com> In-Reply-To: <33A277AE-5F1A-4E95-982A-559A6BB6D26F@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; ocaml:01 gtk:01 ocaml:01 gtk:01 toolchain:01 ocamlopt:01 mli:01 ocamlopt:01 libpath:01 lib:01 lablgtk:01 lablgtk:01 cmxa:01 cmxa:01 -thread:01 Joel Reymont wrote: > Has anyone used ocaml and gtk+ to build non-cygwin app for windows? > > These would be gtk+ apps that don't require the x server. > > What toolchain did you use? I did this a few years ago and got it to work, though I don't remember all the details anymore. I used Visual C++ at the time. I wrote a batch file (yeah, primitive, I know) that looked like this: @echo off setlocal call vsvars32 ocamlopt -c json.mli json.ml ocamlopt -ccopt "/link /libpath:/gtk-2.6.8/lib" -I +lablgtk2 lablgtk.cmxa -I +extlib extlib.cmxa unix.cmxa -thread -I +threads threads.cmxa json.cmx myapp.ml -o myapp.exe ocamlopt unix.cmxa mkwinapp.ml -o mkwinapp.exe mkwinapp myapp.exe The final step, "mkwinapp", was to prevent the DOS command window from showing up. http://ocaml-win32.sourceforge.net/ Dave