www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - too many functions crashes linker as well

Too many functions or too many member functions or too many template
instantiations also crash the linker

unfortunately having a maximum number of functions in a given project that the
linker may link with is really making it difficult to develop anything large.
Visual Studio 6 had this problem as well, forcing me to split my boost file into
3 C++ files...
but in this case merely increasing the number of template instantiations breaks
the linker--so I could have my vector definition in one file then instantiate it
too many places in another file, and it would not let me compile my (tiny)
instantiator file. 

the following is the most heinous crash:
http://graphics.stanford.edu/~danielrh/manyfuncs.d

the following one is a struct with only a few thousand member functions (my last
post showed that member functions and normal functions can both cause such a
linker crash--so it's not just because I have a heinous number of members).
http://graphics.stanford.edu/~danielrh/close.d

setting version=DontCrash on the following one will stop the crash
http://graphics.stanford.edu/~danielrh/sclass.d
in sclass you can move the int main() into another file and watch it crash
depending on how many of the template instantiations you make.
May 07 2004