From 0802c808fd55a508ca6f32a77bca3dae5424611b Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 27 Dec 2018 00:38:04 +0200 Subject: [PATCH] Add a main() function for Windows Console applications (at least those compiled with MinGW) use it as the entry point. MinGW has a support library to use WinMain as entry point, but that requires a hack in builder that causes trouble with applications that have a main() of their own. --- source/core/windows/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/core/windows/main.cpp b/source/core/windows/main.cpp index a0816a4..11df925 100644 --- a/source/core/windows/main.cpp +++ b/source/core/windows/main.cpp @@ -6,6 +6,11 @@ using namespace std; using namespace Msp; +int main(int argc, char **argv) +{ + return Msp::Application::run(argc, argv); +} + int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lpCmdLine*/, int /*nCmdShow*/) { int argc = 0; -- 2.43.0