In GCC, the first non-inline virtual method is used to determine the the translation unit where the vtable and typeinfo objects are created. If you then do not define that method, it creates the error you see, since it expected you define that method somewhere, and was waiting for that definition to emit the output of the vtable and typeinfo for the class.
http://gcc.gnu.org/onlinedocs/gcc/Vague-Linkage.html
When you change the declaration of virtual void draw();
to the inline definition of virtual void draw() {};
, it picks a different function to emit the vtable.