Limit to the size of a .res file?

Limit to the size of a .res file?

Postby Luis Krause » Fri Feb 16, 2007 12:50 am

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
"May the Source be with GNU"
User avatar
Luis Krause
 
Posts: 59
Joined: Tue Oct 11, 2005 1:39 am
Location: Vancouver, Canada

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

Postby Richard Chidiak » Fri Feb 16, 2007 7:36 am

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
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

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

Postby Luis Krause » Sat Feb 17, 2007 1:05 am

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
"May the Source be with GNU"
User avatar
Luis Krause
 
Posts: 59
Joined: Tue Oct 11, 2005 1:39 am
Location: Vancouver, Canada

Postby Rochinha » Sat Feb 17, 2007 6:23 am

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  Expand view
#include "SYSTEM1.RC"
#include "SYSTEM2.RC"


Example:

SYSTEM1.RC contains DIALOGS
SYSTEM2.RC contains BITMAPS and ICONS
Rochinha
 
Posts: 310
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 87 guests