Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
ocaml + non-cygwin gtk+ on windows
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dave Benjamin <dave@r...>
Subject: Re: [Caml-list] ocaml + non-cygwin gtk+ on windows
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
call vsvars32

ocamlopt -c json.mli
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 -o myapp.exe

ocamlopt unix.cmxa -o mkwinapp.exe
mkwinapp myapp.exe

The final step, "mkwinapp", was to prevent the DOS command window from 
showing up.