Question

In a project, during the compilation, the resource-linking process fails with this error: [DCC Error] E2161 Error: RLINK32: Out of memory!.

The project includes a huge res file (about 400 Mb). The error is not triggered if the res file size doesn't exceed 250 Mb. At it's only some RCDATA, I could keep the data in an external file but I would like to know if there is a workaround for this issue.

Was it helpful?

Solution

You can use an external resource linker in a post-build event (Project->Options->Build Events). Below is an example usage for 'ResHacker' (which is able to do pretty much anything with the command line that its GUI can do).

"C:\...\ResHacker.exe" -addskip "$(OUTPUTPATH)", "$(OUTPUTPATH)", "C:\...\icons.res",,,

The example adds the resources in icons.res which are not already in the executable and overwrites the executable. I have no idea if it chokes with your big resource, but you can try using other alternatives if it does.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top