Skip to main content
Topic: Optimizing dll size (Read 2839 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Optimizing dll size

Well, that's the question, how do you make the dll file smaller? I'm using Visual C++ 6.0, and making a release build with the "minimize size" option turned on (for all the sub-projects too). Still the dll size is well over 200KiB. Most plugins seem to be under 100KiB. The project uses ptypes and sqlite3 libraries, but I just can't believe that would cause such a big increase in the size. The source code itself isn't extremely long (1500 lines or so). Any ideas?

Optimizing dll size

Reply #1
PTypes, maybe. Sqlite3, maybe as well, unless you are using the dynamic library version.

Optimizing dll size

Reply #2
Quote
Well, that's the question, how do you make the dll file smaller? I'm using Visual C++ 6.0, and making a release build with the "minimize size" option turned on (for all the sub-projects too). Still the dll size is well over 200KiB. Most plugins seem to be under 100KiB. The project uses ptypes and sqlite3 libraries, but I just can't believe that would cause such a big increase in the size. The source code itself isn't extremely long (1500 lines or so). Any ideas?
[a href="index.php?act=findpost&pid=295058"][{POST_SNAPBACK}][/a]


Do decrease dll size, you can omit C runtime if you do not use C runtime functions

 

Optimizing dll size

Reply #3
Quote
Do decrease dll size, you can omit C runtime if you do not use C runtime functions
[a href="index.php?act=findpost&pid=295207"][{POST_SNAPBACK}][/a]

.. which also breaks C++ compiler generated standard function calls. That won't work with foobar2000 SDK. Probably clashes with other libraries people use as well.
Only proper solution to that is using DLL runtime (MSVC6: Project Settings / C/C++ tab / Code Generation / Use run-time library: Multithreaded DLL).

 
SimplePortal 1.0.0 RC1 © 2008-2020