delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/11/05/00:21:38

From: khan AT xraylith DOT wisc DOT edu (Mumit Khan)
Subject: Re: Linking Resource Files
5 Nov 1998 00:21:38 -0800 :
Message-ID: <9811030614.AA04059.cygnus.gnu-win32@modi.xraylith.wisc.edu>
References: <Pine DOT LNX DOT 3 DOT 96 DOT 981102120027 DOT 3687B-100000 AT trebbiano DOT cs DOT unibo DOT it>
To: Matteo Ceroni <ceroni AT students DOT cs DOT unibo DOT it>
Cc: gnu-win32 AT cygnus DOT com

Matteo Ceroni <ceroni AT students DOT cs DOT unibo DOT it> writes:
> 
> Hello All:
> 
> I'm using gnuwin32 for the first time (B19).
> My first program consists of these files:
> 
> "foo.c", that defines a window class;
> "foo.rc", that defines the menu for the window class;
> 
> Question: how can I make GCC link the resource file to the executable and get
> the window show its menu?

To create .o (object) file from .rc (resource) script:
  
  $ windres -i foo.rc -o foo.o

Then you can just link it.

If you want/need an the intermediate .res (binary resource) format :

  $ windres -i foo.rc -o foo.res
  $ windres -i foo.res -o foo.o

Colin Peters has a short description of resource compiling using GNU
(and other) tools on his Mingw web page.

     Colin Peter's <a href=http://www.fu.is.saga-u.ac.jp/~colin/gcc.html>
     "GCC for Win32"</a> in Japan. Also mirrored in 
     <a href=http://www.geocities.com/Tokyo/Towers/6162/gcc.html>USA</a>

Regards,
Mumit

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019