This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/17556] linker fails to find template


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]