Article View: gnu.gcc.help
Article #42763Templates and exceptions
From: Robert Huffman
Date: Wed, 18 Oct 1995 00:00
Date: Wed, 18 Oct 1995 00:00
29 lines
1670 bytes
1670 bytes
I'm sorry to bother you, because I'm sure this information is somewhere: I just can't seem to find it. And, alas, I have no access to usenet. I cannot seem to instantiate a template class. Everything compiles, but I get a bunch of undefined symbols. Judging by the mangled names, they are simply member functions of my template class as it should be instantiated for a particular type. So, what do I do to actually intantiate the template? The second question concerns exceptions. I was curious as to whether or not my version of gcc implemented exception handling, so I threw in some try and catch blocks. The compiler told me to use the -fhandle-exceptions flag when compiling. I did, but not I get two multiply defined symbols (something like __EXCEPTION_TABLE_ and __EXCEPTION_END_: I can't remember exactly where the underscores appeared). It looks like these symbols are defined in each of my object files, so linking them is impossible. How do I get around this? Again, I'm sorry to bother you with such common questions, but there is very little documentation in my version (2.6.0) about templates, and none about exceptions. Can you help? Thanks. Robert Huffman rhuffman@ent.mrj.com
Technical Details
Message-ID:
<9510181742.AA10721@monet_>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,d78f72d51d44bc27,start X-Google-Attributes: gid11318c,public From: rhuffman@ent.mrj.com (Robert Huffman) Subject: Templates and exceptions Date: 1995/10/18 Message-ID: <9510181742.AA10721@monet_> X-Deja-AN: 117750912 distribution: gnu sender: daemon@cis.ohio-state.edu organization: GNUs Not Usenet reply-to: rhuffman@ent.mrj.com newsgroups: gnu.gcc.help