0

I'm new to making Windows applications. I follow Microsoft's tutorial.

When I build the application, an error occurs. It says:

undefined reference to `WinMain@16'

I don't know how to solve this question. The tutorial's code also cannot build successfully.

The environment:

  • Windows version: Windows 10 21H2
  • C++ language standard: C++ 20
  • windows.h: from g++
  • IDE: CLion 2020.3
  • Remy Lebeau
    • 555,201
    • 31
    • 458
    • 770
    Sam-zhuang
    • 24
    • 5
    • 1
      Can you post your code please ? – QuentinC Aug 29 '21 at 12:51
    • 1
      Add defines for `UNICODE` and `_UNICODE` to the project settings. The project is being build as non-Unicode but `wWinMain` is the Unicode entry point. Looking at the tutorial it requires a Unicode project. If you are leaning MS-Windows and C++ I suggest you use Microsoft Visual Studio 2019 Community edition - as there will be less changes from tutorials. – Richard Critten Aug 29 '21 at 12:54

    0 Answers0