Closed rutexd closed 1 year ago
(I don't know what the default scons options are, so you might not be able to compare directly - you'd have to match up the build & link options.)
It depends on the machine you're compiling for (I assume Windows since you're talking about DLL), the build type (release vs. debug), your linker flags, and the code you're compiling (including other static libs, etc.).
If it's a debug build that certainly increases the size of the library because it's including all debug symbols. What are the sizes of your release build vs. your debug build?
Looks like debug was the real problem 😵💫 In release mode it takes 1 mb... Couldnt think that debug takes so lot trash.... Thanks!!!
No problem!
Yeah - debug build have all the symbols included so you can get decent stack traces when it crashes or when you step through in the debugger. Sometimes these are included in the executable (as in this case) sometimes they are a separate file (I think on Windows it might be .pdb? Not sure - not a Windows guy 😄 ). There is probably a link switch you can use if you want to export them to a separate file instead of building them in.
Some companies ship builds without symbols and keep the external symbol file for the specific build. Then if someone sends them a crash dump they can use the external file with a debugger to get useful info.
Hey hey,
the cmake produces big dll size (45mb on my machine) while the final dll in the official article around several megabytes.
is this intended to be so or i doing something wrong? (basically just compile it via clions cmake...)