This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17556] linker fails to find template
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Sep 2004 04:50:22 -0000
- Subject: [Bug c++/17556] linker fails to find template
- References: <20040919033801.17556.igodard@pacbell.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-09-19 04:50 -------
Can you post step-by-step instructions how I can get to see this problem?
Apart from that -- though I'm sure you are aware of this: if you have the
definition of a template function in a .cc file and you need an
instantiation in another .cc file, then you will necessarily end
up with a linker error unless
- you make the _definition_ of the template visible to the place where
you use it (e.g. by making it inline)
- add an explicit instantiation in the file in which the definition is
located.
Maybe you can comment on why you think that your program doesn't violate
these conditions.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17556