Visual D 0.3.43 beta1 available

Rainer Schuetze via Digitalmars-d-ide digitalmars-d-ide at puremagic.com
Sat Nov 7 05:01:14 PST 2015


On 06.11.2015 14:46, johann wrote:
> On Friday, 6 November 2015 at 13:08:51 UTC, Rainer Schuetze wrote:
>>
>>
>> On 06.11.2015 08:45, johann wrote:
>>> [...]
>>
>> The VC runtime libraries expect a WinMain entry point if you compile
>> for subsystem windows, so you should replace main() with WinMain:
>>
>> import core.runtime;
>> import core.sys.windows.windows;
>>
>> extern (Windows)
>> int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR
>> lpCmdLine, int nCmdShow)
>> {
>>       Runtime.initialize();
>>
>>       Form myForm;
>>       ...
>>       Runtime.terminate();
>>       return 0;
>> }
>>
>> AFAICT this was different in earlier versions of the VC runtime. I'm
>> not sure if the D runtime can/should try to redirect this to main().
>
> thanks - i tried that and it doesn't work. i am bust now.

"doesn't work" means same error?

The WindowsApplication project template works for me, maybe you can use 
it as a starting point.


More information about the Digitalmars-d-ide mailing list