Search code examples
c++virtual-functionsvtablebinary-compatibilitymemory-layout

Should I recompile class implementation when non virtual function changes to virtual function?


I have a old static library(class implement), I'd like to change a non virtual function to virtual function in a class, should I recompile the library?


Solution

  • I wanted to add little more reasoning to answer of @jesper Yes because now there will be new entry per new virtual function in vtable so recompilation is must.