On 5/1/22 05:19, LIU Hao wrote:
在 2022-05-01 13:15, LIU Hao 写道:
This is the alternative patch as discussed with jon_y on IRC.



I forgot to update the commit message. Here is the revised patch.


+Programs are usually linked against the winpthreads DLL, and winpthreads
+headers expose `dllexport` APIs by default. When linking against the
+static library, especially when building a user DLL with libtool, it is
+necessary to define the `WINPTHREAD_STATIC` macro to avoid undefined
+references.

I think dllexport should be replaced by dllimport in the above statement.

Building a DLL with dllexport marked symbols is correct and expected. The problem comes in when dllimport is used when the user intentionally wants to link to a static library, hence they need to add -DWINPTHREAD_STATIC to signal that they do actually want it so.


_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to