GCC C++ Linker errors: Undefined reference to ‘vtable for XXX’, Undefined reference to ‘ClassName::ClassName()’

This linker error usually (in my experience) means that you’ve overridden a virtual function in a child class with a declaration, but haven’t given a definition for the method. For example: class Base { virtual void f() = 0; } class Derived : public Base { void f(); } But you haven’t given the definition … Read more

undefined reference to `WinMain@16′

This error occurs when the linker can’t find WinMain function, so it is probably missing. In your case, you are probably missing main too. Consider the following Windows API-level program: #define NOMINMAX #include <windows.h> int main() { MessageBox( 0, “Blah blah…”, “My Windows app!”, MB_SETFOREGROUND ); } Now let’s build it using GNU toolchain (i.e. … Read more