Page 1 of 1

Limit to the size of a .res file?

Posted: Fri Feb 16, 2007 12:50 am
by Luis Krause
Ugly problem:

We have a big .rc file. This file is edited with Pelles IDE and then compiled into a .res file with xrc.exe (or porc.exe). The resulting .res file is just over 1 megabyte in size.

When ilink32.exe (Borland 5.5.1) tries to link this file into the .exe, it just fails with the not very useful message

Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Fatal: Access violation. Link terminated.

If I remove any resource from the .rc file, then it works again.

Has anyone experienced something like this?
Is this a Windows limit as to the file size of a .res file to be embedded into an executable?

I could try to split it into 2 or more .rc files, but first I'd like to know if anyone has worked with multiple .rc files (do you create a single .res file, or several .res to be linked into the exe?)

Is this a limitation of Borland's ilink32.exe?

All help, comments and ideas are greatly appreciated.

Luis Krause

Re: Limit to the size of a .res file?

Posted: Fri Feb 16, 2007 7:36 am
by Richard Chidiak
Luis

Yes it is unfortunately a memory limit from Borland

I have been through this

Split your rc files into several ones. This is not a problem.

Hth

Richard

Re: Limit to the size of a .res file?

Posted: Sat Feb 17, 2007 1:05 am
by Luis Krause
Richard:
Richard Chidiak wrote:Yes it is unfortunately a memory limit from Borland

I have been through this

Split your rc files into several ones. This is not a problem.
Indeed, splitting the .rc in 2 files and generating 2 .res solves the problem.
If only ilink32's error msg was a bit more descriptive it would solve the headache to figure out the problem.

I now know to keep the .res file under a meg in size before running into trouble.

Thanks!

Luis Krause

Posted: Sat Feb 17, 2007 6:23 am
by Rochinha
Friend

After split your big .RC you need include the others .RCs into .RC master:

You have a SYSTEM.RC and split into two parts:

MASTER.RC

Code: Select all

#include "SYSTEM1.RC"
#include "SYSTEM2.RC"
Example:

SYSTEM1.RC contains DIALOGS
SYSTEM2.RC contains BITMAPS and ICONS