GOUJON Alexandre ale.goujon@gmail.com writes:
To fix it, we need to add msvcrt include (not to link with msvcrt : it's a .o)
ccache gcc-4 -D__WINE__ -c -o cmd.exe-iqnSoR-q4unrB.o cmd.exe-iqnSoR.c -I../../include -I../../include/msvcrt/ succeeds.
At this point, we return from mingw_unicode_hack to line 722.
And winegcc goes on:
779 _ if (!opts->shared && (opts->use_msvcrt || opts->unicode_app)) strarray_add(link_args, "-lmsvcrt"); ...your patch 781 _if (res_o_name) compile_resources_to_object( opts, resources, res_o_name ); ...the previous line works, no errors but 783 _ spawn(opts->prefix, link_args, 0); ..fails
Indeed, the linker [2] wants to link with msvcrt but don't know where the library is :
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: cannot find -lmsvcrt collect2: ld returned 1 exit status winegcc: ccache failed make: *** [cmd.exe] Error 2
Finally, adding -L option [3], all's right.
You can't add include or lib options, that will break the Mingw build.