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

前端 未结 11 656
挽巷
挽巷 2020-12-09 22:20

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\'
         


        
11条回答
  •  一生所求
    2020-12-09 22:58

    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

提交回复
热议问题