Zebediah Figura zfigura@codeweavers.com writes:
It's not actually clear if the ZLIB_PE_CFLAGS and ZLIB_PE_LIBS introduced in 2929aa3c74 were meant for this purpose, given the number of ways in which they're broken. Nevertheless, it would be really quite nice to have, so this series aims to provide that. After these patches I'm able to compile wine using distribution static libraries, with the following configure flags:
configure ZLIB_PE_CFLAGS="$(x86_64-w64-mingw32-pkg-config --cflags zlib)" ZLIB_PE_LIBS="-Wl,-Bstatic $(x86_64-w64-mingw32-pkg-config --static --libs zlib) -Wl,-Bdynamic" PNG_PE_CFLAGS="$(x86_64-w64-mingw32-pkg-config --cflags libpng16)" PNG_PE_LIBS="-Wl,-Bstatic $(x86_64-w64-mingw32-pkg-config --static --libs libpng16) -lmingwex -lmingw32 -Wl,-Bdynamic"
Patches 5-6 are necessary to allow static linking of libpng16.
I don't think that's going to work in general. The linked C runtime needs to match the version that was used when compiling.