ldc2 linux -> windows cross-compile linker error

H. S. Teoh hsteoh at qfbox.info
Sat Jul 26 15:38:52 UTC 2025


On Sat, Jul 26, 2025 at 08:11:59AM +0000, kinke via Digitalmars-d wrote:
> On Friday, 25 July 2025 at 17:30:41 UTC, H. S. Teoh wrote:
> > Strange thing, though: I tracked it down to a `pragma(lib, "Bcrypt");`
> > in one of my modules. However, changing this line to use lowercase
> > "bcrypt" does not make a difference.  Running ldc2 -v indicates that for
> > some reason it gets capitalized to Bcrypt.lib anyway by the compiler.
> > But why is this?  I checked other pragma(lib,...) declarations that had
> > lowercase library names, and they don't get auto-capitalized. Why is
> > bcrypt different?
> 
> I'm pretty sure this is caused by https://github.com/dlang/phobos/blob/4fc3facb47241747d0919ab98501bcf7ea8c595e/std/internal/windows/bcrypt.d#L9.
> [This module was added 3 months ago and is still in the stable branch only,
> not in master.]

Aha! That's where the capital B Bcrypt comes from.  Is there any reason
it's capitalized here but not in the actual library filename?


T

-- 
128√e980


More information about the Digitalmars-d mailing list