Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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 
executable.

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 source.ml moresource.ml myresources.obj


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners