I am setting up a mingw/msys (mingw.org) environment in which to compile some old code that uses this approach to produce some Windows programs. These link to libraries such as libgdi32.a and libz.a etc.
I notice that the combined mingw/msys environment contains two lib folders, and each contains a version of these files, which are different. The files in the msys directory are generally larger and older, it seems.
So my question is: what's the significance of the two lib folders, and why the two versions of the same files?
Further background detailing the mingw setup I have, which I believe to be pretty vanilla:
I downloaded MinGW (mingw-get-setup.exe) from here: http://www.mingw.org/wiki/Getting_Started and followed what I believe to be a pretty standard installation.
During that installation I selected (in MinGW installation manager) to include msys, and several libraries that I expect to need. (So I did not perform a separate install for msys.) I can run msys.bat to open an msys window, and can compile a project using make (and a Makefile).
With this vanilla setup, we get C:\MinGW, including C:\MinGW\lib, and C:\MinGW\msys\1.0\ with various subdirs including C:\MinGW\msys\1.0\lib.
And from within msys console, these library folders are at /lib and /mingw/lib (ie: msys sets up a mount point so that mingw appears within msys's root.)
Example libraries that appear in both libs:
File mingw msys
libz.a 4/21/2018 126k 5/13/2012 343k
libgdi32.a 7/8/2020 221k 1/14/2010 252k
libwinspool.a 7/8/2020 86k 1/14/2010 98k
libws2_32.a 7/8/2020 109k 1/14/2010 82k