0

Can someone let me know what the problem might be here? It seems the linker can not find the min function although it should be able to find it in def.o.

emacs screen showing all the files

Mats Petersson
  • 126,704
  • 14
  • 140
  • 227
rowman
  • 1,516
  • 1
  • 16
  • 26
  • 4
    templates must be defined in header files (*unless explicitly instantiated) – Piotr Skotnicki Feb 16 '15 at 08:27
  • @PiotrS. yes when I move the definition to header it works. why is so? – rowman Feb 16 '15 at 08:29
  • 1
    See [this answer](http://stackoverflow.com/a/12574417/1505939) for explanation and resolution. I have closed the question as a duplicate of the monster "undefined reference" article, but that link is the specific part of the answer relative to your problem. – M.M Feb 16 '15 at 08:29
  • 1
    http://stackoverflow.com/q/495021/3953764 – Piotr Skotnicki Feb 16 '15 at 08:31

0 Answers0