caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Dave Benjamin <dave@ramenlabs.com>
To: Joel Reymont <joelr1@gmail.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] ocaml + non-cygwin gtk+ on windows
Date: Fri, 27 Mar 2009 23:55:01 -0700	[thread overview]
Message-ID: <49CDC9C5.9000603@ramenlabs.com> (raw)
In-Reply-To: <33A277AE-5F1A-4E95-982A-559A6BB6D26F@gmail.com>

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


  reply	other threads:[~2009-03-28  6:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-28  1:04 Joel Reymont
2009-03-28  6:55 ` Dave Benjamin [this message]
2009-03-28  7:42 ` [Caml-list] " Matthieu Dubuget
2009-03-28  8:43 ` Christophe TROESTLER

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49CDC9C5.9000603@ramenlabs.com \
    --to=dave@ramenlabs.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=joelr1@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).