Here is the answer form the author of IUP, hope this would be helpful to someone that met the same problem as me
It seems that you are building a console application. This means you need a “main” function. If you try instead to build a Windows application without a console, then IUP will implement the WinMain function for you and call your “main” function. In both cases you need the “main” function.