在 2025-02-15 23:23, Kirill Makurin 写道:
What do you think if we just guard those rules for `libptrhead[.dll].a` with 
`if !MSVC`?

Libtool has a silly behavior with MSVC tools. When you create a shared library which depends on another (non-libtool) shared library, when it handles `-l{name}` it searches PATH for file `{name} *.dll` (not even `lib{name}*.dll` as it seems) and it will refuse to create shared library if there is no such file. This means that having import library alone will not be sufficient and it also seems like it doesn't even consider static libraries. It gave lots of headache to me.

If people who build winpthreads with MSVC want to use it with Autotools projects they can create hard links like this:

pthread.dll.lib -> winpthreads.dll.lib
pthread.lib -> winpthreads.lib
pthread.dll -> winpthread-{VERSION}.dll

It is not necessary to copy the DLL; the import library contains the name of the corresponding DLL, so it will always reference libwinpthread-1.dll.

I think your patch can be simplified a lot if you do `. libwinpthread.la`, then those variables will become available for use by commands in the hooks.

Meson has `install_symlink()` so this dirty work is unnecessary there.



--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to