[ale] Q: 'g++' Template Instantiation automation approachessought

John Mills jmills at tga.com
Thu Aug 3 08:56:59 EDT 2000



Alexander -

Thanks for your answer.

On Wed, 2 Aug 2000, Alexander Barton wrote:
 
> Maybe I don't understand your problem sufficiently.  But I'll open my
> mouth anyway.  I thought the whole point of templates was to
> automagically instantiate all classes.  I'm using a recent version of
> g++ with heavy template use and have experienced no problems (at least
> none attributable to the compiler).

Well, not necessarily, I find. 'info gcc' recommends one do explicit
instantiation, but you are certainly correct that 'g++' can sort this out.

> Have you told g++ to use the other-than-default template instantiation
> model?  Are you doing any "#pragma interface" and "#pragma
> implementation"?

I inherited a number of makefile includes from the source tree, and one of
them turns off the automatic template processing. I expect to change that
setting.

I am totally green at this, but I think any template used to create an
object member would create the linkage error unless it was either
automatically or explicitly instantiated somewhere (anywhere, I guess) in
the code.

Regards.
 - Mills

   John Mills
   Sr. Software Engineer
   TGA Technologies, Inc.
   100 Pinnacle Way, Suite 140
   Norcross, GA 30071-3633
   e-mail: jmills at tga.com
   Phone: 770-441-2100 ext.124 (voice)
          770-449-7740 (FAX)

--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list