"Paulo Matos" <[EMAIL PROTECTED]> writes: > I didn't know the linker was going to search for unused objects and if > not used it would not include them. Nice to know.
All linkers I know (even the MS ones) work that way, and (AFAICT) always did. > I don't understand why this works this way. It's the *only* reasonable way for linker to work. If it didn't work that way, every program (when linked statically) would include the *entire* code for all libraries it was linked against (including libc, which is quite large). > I have no other solution than using --whole-archive to linker right now, You do have other solutions, e.g. explicitly list objects that must be linked in, and the linker will do the right thing (pulling in only necessary parts of the libraries). Cheers, -- In order to understand recursion you must first understand recursion. Remove /-nsp/ for email. _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus