Subject: Re: Resource (.rc) Files
From: [email-masked] (Eric Britten)

10 Jul 1997 23:13:57 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.01 [en] (Win95; I)
Original-To: [email-masked]
Original-CC: [email-masked]
X-Priority: 3 (Normal)
Original-Sender: [email-masked]

[email-masked] wrote:

>      Hi,
>
>      I am attempting to port a Microsoft C program to GNU C.  All the
> menu
>      setup data is in a resource (.rc) file, which gcc can't compile,
> and
>      the linker can't deal with the .res file produced by Visual C
>      (unrecognized file format). Is there some (relatively) painless
> way to
>      convert this to a C file, or is there an equivalent to a resource
>
>      compiler in the GNU-WIN32 suite?  Is the suggestion of using the
>      Microsoft linker pertinent here? A search of the FAQ, and
> (partial)
>      search of the mail archives revealed nothing useful.
>
>      Two notes: 1) I am new to GNU-WIN32 (but not gcc), and I am
> *very* new
>      to developing Windows applications (have done some X windows
> stuff
>      using Xforms).
>
>
>       Thanx,
>
>       Wilkey Richarson

What you need is a program to convert .res resource object files to
something that ld can use to link into your program.  There is one such
programs availible from
http://www.geocities.com/Tokyo/Towers/6162/gcc.html which is the
'Minimalist GNU Win32' site.  Click the 'Extra Utilities' link.  The
program is res2coff.

in your makefile or by command line add a line to convert the .res file
to a object file that ld or gcc can use.  Then include this file in the
list of object files that the linker will use to build your program.

eg.

res2coff myres.res myres.ro
gcc mywinapp.c myres.ro -Wl,subsystem,windows -luser32

Hope this helps,

Eric Britten

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".