Undefined reference to WinMain@16 - Codeblocks

前端 未结 2 2026
礼貌的吻别
礼貌的吻别 2021-01-28 21:50

I have read: undefined reference to `WinMain@16' & still don\'t understand my problem.

I had a program that was working. Added a class but had not implemented it

2条回答
  •  醉酒成梦
    2021-01-28 22:33

    Change the type of your application under your project settings to Console. WinMain16 is related to Windows graphical applications. I believe you do need to set a special preprocessor flag or include a library of some sort to get it to work properly if you keep it as a Windows graphical application, but in this case, the easiest fix would be to just get a console application.

    Also, maybe adding the -mwindows flag can help you.

提交回复
热议问题