NO

Author Topic: Resource file compiling  (Read 7670 times)

post from old forum

  • Guest
Resource file compiling
« on: September 13, 2004, 10:09:49 PM »
Hi

If I am correct porc.exe is used to create .res files from .rc files
well I was wondering if it is also used to bind the .res file to the .exe or is polink.exe used for the binding?

Can somebody please tell me what command line I should use to bind/link the .res file with a .exe

Jacques

post from old forum

  • Guest
Resource file compiling
« Reply #1 on: September 13, 2004, 10:10:14 PM »
Hello,

In the 16-bit days, the resource compiler (at least the one from Microsoft) was responsible for adding the binary resource file (.res) to the executable. In the 32-bit world, this job has moved to the linker. Just add the .res file to the command line for polink, like any other .obj file, and it should work.

Pelle

post from old forum

  • Guest
Resource file compiling
« Reply #2 on: September 13, 2004, 10:10:40 PM »
Thank you for the help, Pelle  

Jacques

post from old forum

  • Guest
Resource file compiling
« Reply #3 on: September 13, 2004, 10:11:09 PM »
Is there a way that I can add a res file to a exe that already exists? I don't want to use the obj file to recompile my program every time I change the resource.

Jacques

post from old forum

  • Guest

post from old forum

  • Guest
Resource file compiling
« Reply #5 on: September 13, 2004, 10:12:07 PM »
You can use Pelles C IDE for this. Just open the executable file - like any other file. When the file is loaded, you should see the normal resource tree. Just add or import a resource, and then save the file.
This should work without trouble on Windows NT/2K/XP, and I think (not tested) also on Windows 9X *if* you install the extra 'Unicode layer' which is available (can't remember the exact name right now).

Pelle

post from old forum

  • Guest
Resource file compiling
« Reply #6 on: September 13, 2004, 10:12:35 PM »
Thank you for helping  , but I actully want to add the resource file to the executable without having to do it manualy with third party software. (I want to use a command line tool or something that my program can call to add res files to exe files)

Jacques

post from old forum

  • Guest
Resource file compiling
« Reply #7 on: September 13, 2004, 10:13:02 PM »
I don't have a command line tool for this. If you want to do it yourself, look at the WIN32 API functions, BeginUpdateResource, UpdateResource, EndUpdateResource. This will require some knowledge about resource formats, depending on the type. For example RCDATA is simple, but ICON and CURSOR require much work.

Pelle