0

I am trying to create templated abstract base class. This class will have couple of pure virtual functions. It will also have two methods that are defined in it.

Then I derive from this templated abstract base class (I derive by specializing the template) and call those two methods that were defined in the templated abstract base class from the overloaded functions.

When I do this and try to compile I get undefined reference to. I am using cmake for building. Compilation works when I remove those two methods that were defined in base class.

mato
  • 503
  • 8
  • 18
  • Show code instead of description. – Jarod42 Dec 21 '18 at 15:42
  • *"(I derive by specializing the template)"*, seems suspicious. – Jarod42 Dec 21 '18 at 15:43
  • @Jarod42 Turns out I had the declaration of those two methods that were defined in base class in derived class as well. It was there in first place because initially the derived class had those method. During cleaning process I forgot to clean .h file of derived class. – mato Dec 21 '18 at 21:41

0 Answers0