Windows startup docs are out of date

Manu turkeyman at gmail.com
Wed Jan 8 03:17:13 PST 2014


On 8 January 2014 18:46, Mike Parker <aldacron at gmail.com> wrote:

> On 1/8/2014 6:29 AM, Adam D. Ruppe wrote:
>
>> On Tuesday, 7 January 2014 at 21:26:07 UTC, Manu wrote:
>>
>>> This doesn't work anymore. I don't know what the proper way to boot a
>>> Win32 app is.
>>>
>>
>> The easiest way is to just write a regular program with a main() instead
>> of a WinMain. If you need the args, you can get them from functions like
>> GetModuleHandle, GetCommandLine, etc.
>>
>>
> The easiest way is to use main() and add this to the DMD command line:
>
> /SUBSYSTEM:WINDOWS:5.01
>
> This will give you a windowed app with no console popping up *and* the
> command line args are still stored in Runtime.args and passed to the main
> method just as they are in a console app.
>
> Note that 5.01 is for 32-bit. 5.02 should be used when compiling for
> 64-bit.
>

Right... well, I don't really care how it is, I just want the wiki to be
updated with the 'standard' way. I will then copy and paste into my code,
and ideally everyone's startup code will look the same.
I have to say though, requiring additional linker arguments is pretty lame.
I'd definitely rather not, if I was voting on a standard approach.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140108/f62adc3c/attachment.html>


More information about the Digitalmars-d mailing list