This is a question about static linking, but not the same one that is answered in the on-site Wiki and elsewhere. I have a cross platform application in mind. And I want to distribute a single binary. I'd like the binary to be as small as possible, it won't be doing very complicated things.
Now as far as I understand qt, all the library modules are compiled into libraries per module. So QtNetwork is found in libQtNetwork.so.4.1.4. But I don't need all of QtNetwork, I only need a small subset of it. And with the other modules it would be the same story. So how about copying parts of the qt source (only what I need) into my project dir and compiling the source as if it were part of my project?
This would reduce the size of the binary, wouldn't it? But is this a good idea? The question is how would I then build the project? Could I still use qmake (I would like to on account of it doing some nice platform-specific handling)?
I would like a build system that would build a static binary for every platform from the same source..
Bookmarks