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] (possibly OT) Can ocamlopt generate an icon for a Win32 exe?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-08-14 (17:12)
From: Karl Zilles <zilles@1...>
Subject: Re: [Caml-list] (possibly OT) Can ocamlopt generate an icon for a Win32 exe?
Richard Jones wrote:
> I'm sorry if this question is off-topic. Is there a way that ocamlopt
> can be told to attach an icon to a Win32 executable?

Yes.  What you're really asking is, can you attach resources to an ocaml 

Generate a .res file with your icon in it.  You can either do this with 
a number of IDE tools, or by creating a .rc file and compiling it with 
"rc" the resource compiler.

Then run the program "cvtres" (mine is in /Program Files/Microsoft 
Visual Studio/VC98/Bin/.  If you are using cygwin, then there is a 
program called "windres" which is supposed to do the same thing with 
different arguments)

cvtres /OUT:myresources.obj myresources.res

This generates an obj file you can just include in the compile:

ocamlopt myresources.obj

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