-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build failed(Error C1060) with big resource files. #32
Comments
Interesting issue. Are all of the files around the same size of 155 MB? It's possible that there is no good solution. The "embed as character array" is mostly just a hack. I've not encountered any cases with such large individual files. Something smarter with generated assembly code might be warranted in this case, which CMakeRC doesn't yet do. |
Not all resource files are 155 MB in size. Could you give me some guide(or some reference) for "generated assembly code"? |
Some assemblers support "include this binary file." As far as I know, MSVC's MASM does not, unfortunately. I do not know an easy way to include such a large file as a single block of data. Large data like this may require a smarter resource compiler than CMakeRC. |
Thank you for answer. Let's find another way. (Unfortunately I'm using MSVC). |
@dhckdaks just as an idea - Windows offers Resource Compiler tool (https://docs.microsoft.com/en-us/windows/win32/menurc/resource-compiler) which might be applicable if you only target Windows. I've tried incorporating it as part of my PR #21, but haven't perused further as the usage differs from a "compiled read only data" approach (seems like it gets added to some other part of the final compiled file and some sort of runtime is used to read it out). The runtime code also needs to know whether the data was part of the application or dll, etc... If you are however okay with this differences, I suggest you to use this - it should lift the big file restrictions. If you still want cross platform usage, then use my #21 PR for other compilers, which easily handle such large files as the compiler performs the insertion of the binary file directly, compared to compiling a large char array. |
I have a few resource files around 155 MB.
In the building process, the following error occurred:
(I used msvc tool set.)
(And overloads memory and disk. My computer almost died...)
How to solve this problem?
The text was updated successfully, but these errors were encountered: