English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] ocamlopt, windows, and no console
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-04-11 (17:31)
From: Harry Chomsky <harry@c...>
Subject: Re: [Caml-list] ocamlopt, windows, and no console
Jonathan Roewen wrote:
>> -cclib /link -cclib /subsystem:windows
> Indeed I was scanning the options, and found those. The problem is
> that when you use that, you have to use WinMain instead...

You can use the linker flag "/entry:mainCRTStartup" alongside the 
"/subsystem:windows" flag to achieve what you want: an executable with no 
console but using main() as the starting point.  That's what my OCaml-Win32 
library does when you link the tiny file lkwinapp.obj into your application. 
There's some discussion of the pros and cons of this approach in the 
build.txt file.  If you're curious, the library is available at: