Re: Program exited with code 1

2018-04-19 Thread Mike Parker via Digitalmars-d-learn
On Thursday, 19 April 2018 at 11:21:52 UTC, Andrey wrote: On Thursday, 19 April 2018 at 08:37:19 UTC, Andrey wrote: What will be a solution? It seems to me that I found a solution - just replace WinMain() with main(). That's fine when you want a console app, but it leaves you with a consol

Re: Program exited with code 1

2018-04-19 Thread Andrey via Digitalmars-d-learn
On Thursday, 19 April 2018 at 08:37:19 UTC, Andrey wrote: What will be a solution? It seems to me that I found a solution - just replace WinMain() with main().

Re: Program exited with code 1

2018-04-19 Thread Andrey via Digitalmars-d-learn
On Thursday, 19 April 2018 at 08:24:55 UTC, user1234 wrote: The run-time is not already initialized but the "new" operator relies on it. What will be a solution?

Re: Program exited with code 1

2018-04-19 Thread user1234 via Digitalmars-d-learn
() nothrow { } } extern(Windows) int WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpCmdLine, int nCmdShow) { new Test(); // error is here return 0; } When I run it, there is an error: Program exited with code 1. If I comment &quo

Program exited with code 1

2018-04-19 Thread Andrey via Digitalmars-d-learn
hInstance, HINSTANCE, LPSTR lpCmdLine, int nCmdShow) { new Test(); // error is here return 0; } When I run it, there is an error: Program exited with code 1. If I comment "new Test();" - no error happens. Why? How to create