On cygwin, these programs fails because they lack __wargv definition. So adding -mno-cygwin flag tell winegcc to link them with msvcrt instead of libc

Alexandre Julliard julliard at winehq.org
Tue Mar 16 16:08:00 CDT 2010


GOUJON Alexandre <ale.goujon at gmail.com> writes:

> I agree these programs don't need any msvcrt function.
> However, building on Windows calls mingw_unicode_hack (winegcc.c l.546)
>  551     create_file( main_stub, 0644,
>  552                  "#include <stdlib.h>\n"
>  553                  "extern int wmain(int,wchar_t**);\n"
>  554                  "int main( int argc, char *argv[] )\n{\n"
>  555                  "    return wmain( argc, __wargv );\n}\n" );
>  556     return compile_to_object( opts, main_stub, NULL );
>
> So __wargv definition is needed (do we need the whole msvcrt library ?).
>
> As you don't want to link these with msvcrt, I'm wondering if we can
> use something like mbsrtowcs.

You can link with msvcrt on cygwin, if that works.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list