So I haven't done any programming in a while, and to ease my way back into a rather massive project I decided to lump one aspect of the menial functions (which includes about 10 different classes and data etc) into a static-link lib. But a thought just occured to me I can't find a quick answer to, and I figured someone here would probably know.
My app already uses a SLL called Common.LIB full of extremely low level tools (data, error, memory handling etc). Many of those tools use templates, and what I'm wondering is, if foo.LIB links Common.LIB and Project bar links both fu AND Common; Will MSVC 6.0 be smart enough to use code already generated from the templated Common classes which will be found in foo.LIB or will it generate a whole second set of identical code, thus bloating the app?
To further illustrate my point (as that may have been a little confusing):
Code:
//Project Foo uses a templated Common.LIB class thus
CommonData<int> SomeStuff;
CommonData<char *> SomeOtherStuff;
//and so now Foo.LIB will contain code for an int and a char * version of the CommonData class...
//Project Bar links to Foo.LIB and Common.LIB, then desires this:
CommonData<int> DataForBar;
So, will the final compiled executable contain 2 identical code segments for an int verson of CommonData? What will actually happen?