#1 2013-11-20 21:07:27

Leander007
Member
From: Slovenia
Registered: 2011-04-29
Posts: 113

RLINK32 alternative?

Hi,
does anybody knows RLINK32.DLL alternative (maybe patched one) or maybe who knows detailed info about E2161 Error: RLINK32: Too many resources to handle.
On net there is no "real answer or solution" about this problem, beside "refactor your code to use DLL-s".
After reading post on qc.embarcadero.com, I'm not sure is RLINK32 buggy or what? Is there some known workaround if you don't have possibility to do huge refactoring of program?

In my case we have huge legacy application with lost of 3rd components, which outputs ~90 MB executable (build with Delphi 2007). Application was localized with in-house solution, which replaced const texts in pas files, so rebuild of it was needed for each localization on proper PC (different code page).

Now I tried to replace all const declarations to resourcestring (> 7500) to use other localization tool and this error happens.
It is really frustrating because there is not known limit (at least not publicly) about resources.
Message "Too many resources to handle" does not help at all. What that means? Count of resources, size of all resources?
Is this limitation of RLINK32 or WINDOWS PE or is this just plain bug "living" in RLINK32?

Does anybody knows something about this issue, any help is appreciated?


"Uncertainty in science: There no doubt exist natural laws, but once this fine reason of ours was corrupted, it corrupted everything.", Blaise Pascal

Offline

#2 2013-11-20 21:12:45

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: RLINK32 alternative?

I do not know any alternative...
You may try to switch your resourcestring into several units.
Or you can create your .rc files by hand containing all RESOURCESTRING resources, then compile it manually into a .res file (using not RLink32 but another resource compiler), then link it with $R conditional.

Or what you can do is still use const text (in English e.g.), then translate it before use, e.g. via a function.
In mORMoti18n.pas, we provide resourcestring on-the-fly translation, or use of the _() function:

ShowMessage(_('Some message to be translated'));

So you do not use resources in this solution...

Offline

#3 2013-11-20 21:27:14

Leander007
Member
From: Slovenia
Registered: 2011-04-29
Posts: 113

Re: RLINK32 alternative?

Hm, maybe combination of both (RC + translate on demand) would worked with some "load trick", because translations should be on one place and here will be used for i18n Sisulizer solution (which natively works via resource strings).

In my personal projects I already use your implementation of i18n with success smile, but this badly written (not by me smile) huge application is "my daily work"...

Thanks for tips, based on them I have some new ideas smile.

P.S.: I think that moving resourcestring in several pas units will not help, because in the end is all put in one DRC file and after that it fails.

Last edited by Leander007 (2013-11-20 21:47:41)


"Uncertainty in science: There no doubt exist natural laws, but once this fine reason of ours was corrupted, it corrupted everything.", Blaise Pascal

Offline

Board footer

Powered by FluxBB