From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA18097; Thu, 14 Aug 2003 19:12:31 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA13199 for ; Thu, 14 Aug 2003 19:12:29 +0200 (MET DST) Received: from remt24.cluster1.charter.net (remt24.cluster1.charter.net [209.225.8.34]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h7EHCTf17936 for ; Thu, 14 Aug 2003 19:12:29 +0200 (MET DST) Received: from [68.113.10.87] (HELO 1969.ws) by remt24.cluster1.charter.net (CommuniGate Pro SMTP 4.0.6) with ESMTP id 123028934; Thu, 14 Aug 2003 13:12:26 -0400 Message-ID: <3F3BC39B.8000607@1969.ws> Date: Thu, 14 Aug 2003 10:15:07 -0700 From: Karl Zilles Organization: 1969 Communications, Inc. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030529 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Richard Jones CC: caml-list@inria.fr Subject: Re: [Caml-list] (possibly OT) Can ocamlopt generate an icon for a Win32 exe? References: <20030814094958.GA692@redhat.com> In-Reply-To: <20030814094958.GA692@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 ocamlopt:01 cygwin:01 bin:01 compiler:01 ocaml:01 off-topic:01 compile:02 executable:03 wrote:03 obj:03 compiling:03 arguments:03 res:06 source:07 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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