This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Resource (.rc) Files


gwrichardson@ccgate.hac.com 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
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]