views:

165

answers:

4

Hi,

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 to 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) ?

Thanks !

STL

A: 

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.

Kamil Klimek
I will definitely try that ! Thanks for the tip, I'll keep you posted !
STL
A: 

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.

Paul
A: 

Splitting the files didn't work.

I guess the compiler complains more about the sheer size of the resulting C++ file than the size of the included files themselves. I splitted the files down to 1 MB chunks, but it's the same thing no matter how small the parts are.

STL
A: 

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 !

STL