We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3579

Summary: SDL_main seems not working and not-using on MinGW (non-w64).
Product: SDL Reporter: Vitaly Novichkov <admin>
Component: mainAssignee: Sam Lantinga <slouken>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.1   
Hardware: x86   
OS: Windows (All)   

Description Vitaly Novichkov 2017-02-02 09:06:18 UTC
Because SDL_main doesn't works on MinGW (MinGW itself uses generic main or ANSI-based WinMain).

Myself I implemented the thing which will 100% give UTF8 into the main() function:
https://github.com/WohlSoft/PGE-Project/tree/master/_common/Utf8Main

I just ignoring all arguments of WinMain, and taking command line by GetCommandLineW(), then splitting it into separated arguments by CommandLineToArgvW call and then converting each argument into UTF-8 to store into separated array which will be sent into regular main function.

Also, my reply is: if you have no UNICODE macro, just don't use WinMain's arguments and get them by GetCommandLineW() call, split and convert into UTF8.