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
[Caml-list] Windows (MSVC) applications without the console window...
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-05-14 (16:55)
From: Harry Chomsky <harry@c...>
Subject: Re: [Caml-list] Windows (MSVC) applications without the console window...
> > I'm using OCaml 3.07 on Windows (MSVC build) and I wonder
> > whether it's possible to create standalone applications
> > that run without opening a console window. Some googling
> > directed me to mkwinapp (from the OCaml-Win32 distribution)
> > but apparently it doesn't work.

Can you be more specific about what doesn't work?  I haven't tried it with
the most recent versions of OCaml and Windows, so there may be bugs that I
don't know about.  Or you may be running into the limitations caused by
OCaml's use of a separate application for its runtime (ocamlrun.exe).  Make
sure you read and understand section 3 ("Subsystems") of the file build.txt
included with the OCaml-Win32 distribution.

> And then a simple call to free_console() will remove the console.

That might work, but I think it might look less clean than having a true
windows subsystem app.

> One other way is to hack the exe in order to change its mode from "console
> application" to "win32 application". Maybe an ocaml linker option would be
> nice to do that.

That's exactly what the "lkwinapp" and "mkwinapp" features of OCaml-Win32
do.  But again, if you read the "Subsystems" documentation mentioned above,
you will see why it might not work as well as you'd hope.

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: