I\'m learning C++ with Code::Blocks, and everytime i try to create a new class, I get an error message saying:
undefined reference to `WinMain@16\'
>
Fix: undefined reference to `WinMain@16' or undefined reference to 'class-name::class-name()' in codeblocks Error in CodeBlocks
I had same problem. Actually it was very easy to fix. On Menu bar go to
project --> build option Put check mark on Have g++ follow the C++11 ISO C++ language standard [-std=c++11]
then click ok and build and run your project [F9] . click here to see screen capture image. Separate Class files code blocks fix