On 3/18/2013 19:21, Janne Hyvärinen wrote:
> On 18.3.2013 11:35, JonY wrote:
>> Before anyone does anything, see __wgetmainargs
>> <http://msdn.microsoft.com/en-us/library/ff770599.aspx>.
>>
>> It can expand wildcards. Since it already provides argc/argv/env, it is
>> more a less a drop-in replacement for the main() arguments.
> 
> MSVC also comes with
> http://msdn.microsoft.com/en-us/library/8bch7bkk%28v=vs.80%29.aspx. To
> support unicode with these methods would require somewhat more #ifdef
> code in main. We'd need to change project files to define Unicode
> character set and turn main into _wmain and char *argv to wchar_t *argv.
> Also these are MSVC's internal features, if I'm not mistaken. Other
> compilers on Windows would then require different solutions.
> 

For setargv.obj, it is equivalent to doing "int _dowildcard = 1;" in any
linked object on mingw.

For wmain, regular mingw does not support it, but mingw-w64 does. The
issue is that the former is far more common in the wild.

I still prefer the __wgetmainargs approach, the exact same code can be
used for both mingw and msvc. We don't need to care about 9x, I think.



Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev

Reply via email to