"Larry Hastings" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Second of all, the dumb-as-a-bag-of-rocks Windows linker (at least > the one used by VC++ under MSVS .Net 2003) *links in unused static > symbols*. If I want to excise the code for a module, it is not > sufficient to comment-out the relevant _inittab line in config.c. > Nor does it help if I comment out the "extern" prototype for the > init function. As far as I can tell, the only way to *really* get > rid of a module, including all its static functions and static data, > is to actually *remove all the code* (with comments, or #if, or > whatnot). What a nosebleed, huh? >
This may not be a linker issue. There is a C++ switch /Gy that "enables function-level linking". That is, without this option enabled, if any function in a module needs to be linked, the linker goes ahead and links the whole module. I guess this is supposed to be some kind of linker optimization. The problem is that the rest of the module may introduce additional link dependencies, thus aggravating the problem. Perhaps changing the C compiler to use function-level linking could address this problem. -- Paul -- http://mail.python.org/mailman/listinfo/python-list