From: Mikko Rasa Date: Wed, 26 Dec 2018 22:38:04 +0000 (+0200) Subject: Add a main() function for Windows X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=0802c808fd55a508ca6f32a77bca3dae5424611b;p=libs%2Fcore.git 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. --- 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;