D
David T. Ashley
Guest
I'm making Win32 statically-linked applications written in C.
Small .EXE's are a goal.
I experimented with a library project, and it appears that the minimum unit that can be extracted from a library by the linker is a "module", rather than a "function". This will make .EXE's larger than they need to be.
For large collections of functions in a module (a collection of independent integer arithmetic functions, for example), is there any way to compile the module so that each function is individually extractable by the linker?
If the answer is "no", then I can split things up into one function per module or use the preprocessor to compile one function at a time based on preprocessor switches (I've seen many libraries written this way), but I was wondering if there is any more convenient method.
Thanks!
Continue reading...
Small .EXE's are a goal.
I experimented with a library project, and it appears that the minimum unit that can be extracted from a library by the linker is a "module", rather than a "function". This will make .EXE's larger than they need to be.
For large collections of functions in a module (a collection of independent integer arithmetic functions, for example), is there any way to compile the module so that each function is individually extractable by the linker?
If the answer is "no", then I can split things up into one function per module or use the preprocessor to compile one function at a time based on preprocessor switches (I've seen many libraries written this way), but I was wondering if there is any more convenient method.
Thanks!
Continue reading...