Reputation: 2488
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
Upvotes: 1
Views: 233
Reputation: 27889
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.
Upvotes: 2
Reputation: 64404
The error margins would make any such estimate useless for any practical purposes.
Upvotes: 1