C++ undefined reference to WinMain@16 (Code::Blocks)

同样的问题,

http://stackoverflow.com/questions/21500724/c-undefined-reference-to-winmain16-codeblocks

解决方案为

Try this: Settings->Compiler, click the tab Build options, select the checkbox

Explicitly add currently compiling file’s directory to compiler search dirs

P.S.

Next time when you create a new class, in the File policy section, make sure you select checkboxes

  • Add path to project
  • Header and implementation file shall be in same folder

However, do NOT select

Use relative path

Leave a Reply

Your email address will not be published.