With mingw-w64 version 4.9.1, installed with the MSYS2 installer, I'm building a DLL and linking it to ws2_32.dll using the -lws2_32 option. But mingw-w64 can't find ws2_32.dll under that name:
*** Warning: linker path does not have real file for library -lws2_32.
If I go into C:\Windows\system32 and copy ws2_32.dll to libws2_32.dll, then mingw-w64 can find it. This seems like a bad hack, however. I tried -l:ws2_32 since I read that the ":" has special meaning, but that made no difference.
How can I tell mingw-w64 to link to a Windows DLL whose name does not begin with lib?
-lws2_32.dll. - slugonamission-l. - slugonamission-l:ws2_32.dll. With the colon, you must specify the complete file name, including extension, but the linker still searches the library path for it. - John Bollinger