开发者

Does Qt have resource system limits?

开发者 https://www.devze.com 2023-01-02 01:45 出处:网络
My Qt application depends on Oracle DLLs to start. As it\'s linked statically for the most part (except for these DLLs), I\'d like t开发者_如何转开发o embed the DLLs and the EXE into a launcher that w

My Qt application depends on Oracle DLLs to start. As it's linked statically for the most part (except for these DLLs), I'd like t开发者_如何转开发o embed the DLLs and the EXE into a launcher that would behave like a fully static application (one exe, no DLLs to take along).

The launcher would extract the included files in a temp directory, launch the software, and clean up when done.

I've tried to embed the EXE and the Oracle DLLs (around 30 MB) in the launcher using Qt resource system, but the compiler (MSVC 2005) fails with

fatal error C1001: An internal error has occurred in the compiler.

Is there a size limit for resources included with Qt's resource system (or do I abuse it by including such large files in my executable)?


If splitting the binary file alone won't do, using one resource file per chunk of the binary file will.

This way, the resulting cpp file is much smaller and the compiler is able to process it.

I've been lucky with 10 MB chunks, so that makes 5 resources files (one for the unsplit DLLs and 4 for the chunks of the larger DLL).

Just remember to join the chunks before use !


Limit comes from compiler, as error says it is INTERNAL compiler error. So compiller couldn't handle it. You could try to walkaround it, by splitting bigger files in to small parts and manualy put them together in your code. I'm not sure if it will work, but it is worth trying.


Qt resources are processed by resource compiler and .cpp file is generated for each .qrc file. I suppose your generated .cpp file is huge (should be more than 30MB) and VC compiler just can't compile such huge source file.

0

精彩评论

暂无评论...
验证码 换一张
取 消