PDA

View Full Version : large dll files issues



alireza.mirian
18th November 2010, 22:58
hello
I have written some small applications with Qt (http://www.4shared.com/file/DLsI72QP/Invisible_Detector_092__Beta_s.html , some others...) but my problem is with the LARGE size of Qt applications! :( if you totally create a simple QWidget in your application, it will need QtGui.dll that is about 7Mb!!!! :O
is there any way to reduce the size of application?

john_god
19th November 2010, 15:00
If you have a comercial license you could compile it statically and then use upx on the exe file to reduce size. There are other considerations on reducing the app size, if you search in this foruns I believe I already read some thread's about that.

tbscope
19th November 2010, 18:44
And make sure you don't add debugging information. You can do a simple strip to remove those.

squidge
19th November 2010, 19:00
Not really a fault of Qt, but more a fault of the OS. Under Linux for example, you only need one copy of the Qt library regardless of how many applications use it. Under Windows there is no central place, so applications typically include it in there installed directory.

john_god
19th November 2010, 21:37
Under Windows there is no central place, so applications typically include it in there installed directory I think for windows the central place is c:\windows\system , the problem is when different versions of the same dll arrive, that starts to cause a mess in the system, the famous dll hell

alireza.mirian
5th January 2011, 19:25
thank U, but is there any way to bulid custom dll with smaller size that only have that part of class implementation that I need?
2) I read somewhere that static compiling produce LARGE .exe file instead of needing .dll files, and the problem still exists, is it true?

Added after 5 minutes:


I think for windows the central place is c:\windows\system , the problem is when different versions of the same dll arrive, that starts to cause a mess in the system, the famous dll hell
I think it is WINDOWS_DIR/system32, but its not important because when U want to build setup package of your program, you can not assume that user has .dll files already. you should put these damn .dlls to your package! :(

squidge
5th January 2011, 23:50
Sure, you have the source code, you can recompile a set of Qt DLLs specific to your project.

If you statically link, then basically, the size of the library will be added to your executable.

Please read and understand the license first however if you wish to static link or distribute modified DLLs with your project.