lime icon indicating copy to clipboard operation
lime copied to clipboard

Fix `Main.cpp` template for `-static` `-debug` builds

Open arm32x opened this issue 3 years ago • 1 comments

When building a Lime application in debug mode on Windows, the console subsystem is used and Windows looks for a main function. However, the Main.cpp file used when linking statically always defines a WinMain function regardless of whether the application is being built in debug mode.

This pull request adds an additional check in Main.cpp to define a main function instead of WinMain when building in debug mode.

arm32x avatar May 04 '22 17:05 arm32x

Good explanation, and the changes look straightforward.

Unfortunately I don't test on Windows, so I can't test this myself. Hopefully someone else can come along and give it a spin.

player-03 avatar May 04 '22 17:05 player-03