Hello,
I wrote a small test code with WinApi:

----------------------------------------------------
import core.runtime;
import std.utf;

import core.sys.windows.windows;
import core.sys.windows.wingdi;

class Test
{
    public this() 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 "new Test();" - no error happens. Why? How to create instances of classes?

DMD v2.077.1, Windows 10.

Reply via email to