home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / cplus / 19755 < prev    next >
Encoding:
Internet Message Format  |  1993-01-22  |  1.7 KB

  1. Path: sparky!uunet!pipex!warwick!bham!pickerig
  2. From: pickerig@eee.bham.ac.uk (Guy Pickering)
  3. Newsgroups: comp.lang.c++
  4. Subject: Was: Template Use <sigh>
  5. Date: 22 Jan 1993 15:48:29 GMT
  6. Organization: The University of Birmingham, England
  7. Lines: 36
  8. Message-ID: <1jp50dINNk34@rs6000.bham.ac.uk>
  9. NNTP-Posting-Host: nanda_devi.eee.bham.ac.uk
  10. X-Newsreader: TIN [version 1.1 PL6]
  11.  
  12. Firstly, thank you to all those who replied...I am at least half way
  13. there, but wondering if brute force and ignorance isn't the answer.
  14.  
  15. Anyway, my problem in more detail is this: I have three directories
  16. which contain the following:
  17.  
  18.   1/ The .C and .H files defining the template class LookupTable.
  19.   2/ The .C and .H files of an algorithm which uses LookupTable<unsigned
  20.      char>
  21.   3/ A main.C which binds the whole lot together, but does not itself
  22.      use LookupTable<unsigned char>
  23.  
  24. The problem is that at link time, no template instantiation takes
  25. place and then the real linker complains about all my member functions
  26. of LookupTable<unsigned char> being unresolved.
  27.  
  28. The AT&T C++ manual says:
  29.  
  30.   If there are any unresolved symbols, the instantiator builds a list of
  31.   class templates and function templates that must be instantiated....
  32.  
  33. There are unresolved symbols, yet the instantiator doesn't do anything
  34. about them.
  35.  
  36. What am I doing wrong??? Any ideas?
  37.  
  38. Guy. 
  39.  
  40. --
  41. +--------------------------------+-----------------------------------------+
  42. | Guy Pickering                  | School of Electronic & Electrical Eng,  |
  43. | E-MAIL: G.PICKERING@uk.ac.bham | University of Birmingham,               |
  44. | Tel: (021) 414 4340            | Edgbaston, Birmingham. B15 2TT.         |
  45. +--------------------------------+-----------------------------------------+
  46.  
  47.  
  48.