[Mingw-users] How to build a library compatible with dlopen?

Back to archive index
Keith Marshall keith****@users*****
Fri Dec 7 05:31:54 JST 2018


On 06/12/18 17:27, Eli Zaretskii wrote:
>> From: Keith Marshall <keith****@users*****>
>> Date: Thu, 6 Dec 2018 14:17:36 +0000
>>
>>> There's nothing special about MinGW dlopen, ...
>>
>> Actually, there is ...
>>
>>> ... AFAICT: it is just a fancy way of calling LoadLibrary.
>>
>> While you may consider it as such, this trite dismissal may serve to
>> denigrate the additional features it offers; e.g.:--
> 
> No denigration intended, to be sure.

No, I didn't really think it was intended -- I just felt that some
clarification was warranted.

> I was describing what dlopen will do in the OP's use case, that
> doesn't seem to need the additional (and important) features.

Well, we may assume that the OP doesn't need them; he doesn't actually
give us enough information for us to make a clear judgement, (and nor
does he need to, in this particular case).

You are quite right that the additional features are important -- some
of MinGW's legacy platform support code depends on, in particular, the
ability to perform dlsym( RTLD_DEFAULT, ... ) symbol lookup, (the most
notable, perhaps, being the printf() output format control APIs, where
we want to let the MSVCRT.DLL implementation take control, when it
exists, but we must provide a suitable fall-back when it doesn't).

-- 
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <https://lists.osdn.me/mailman/archives/mingw-users/attachments/20181206/110070d1/attachment.sig>


More information about the MinGW-Users mailing list
Back to archive index