Question

currently I'm fixing some issues regarding to small outputted dll (I'm using Ribosome build system on Windows) so I'm wondering this:

suppose project (C++) include source files whose total size is i.e. 100 KB and project also depends on i.e. 3 libraries, each about 100KB, what binary size should I expect after compiling and linking? Can I estimate this up front?

p.s. assuming that this is release build with turned off any kind of optimization and source files contain pure code without any comments or similar

Thanks

Was it helpful?

Solution

I don't think you can do an upfront estimation of the generated size. There is no correlation between the number of lines of code and size of the generated binary.

Even in Release mode, the compiler can convert hude amount lines of codes into a small block of execution and the reverse is true.

OTHER TIPS

The error margins would make any such estimate useless for any practical purposes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top