views:

39

answers:

2

Hi,

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

+1  A: 

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

JesperE
+2  A: 

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.

Laurent Etiemble
Thanks for an answer but if I ignore source files, can I make any estimation based on statically linked library sizes?
sinec
Won't work either, except as a rough upper limit.
MSalters
@MSalters Thanks!
sinec