Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Optimizing dll size (Read 3441 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).
Microsoft Windows: We can't script here, this is bat country.