Eli Zaretskii <[email protected]> writes:

>> Ok. I'm now cc:ing the list. Context: Link error when building a dynamic
>> libnettle.dll and libhogweed.dll, and statically linking to libgmp.a.
>
> AFAIK, this cannot possibly work on Windows.  A DLL cannot depend on a
> static library.  And if the linker is clever enough to copy the entire
> libgmp into the DLL, you will have trouble while linking programs
> against such a DLL, like the trouble we see here.

Thanks. I wasn't entirely sure if this problem was windows-specific or
not.

And it's equally impossible to omit -lgmp when linking libhogweed.dll,
and only add -lgmp when linking the executable?

For ELF systems, if libhogweed is dynamic and libgmp is static, is it
still the right thing to do to link libhogweed with -lgmp, which will
copy needed gmp objects into libhogweed.so?

> No, the symbols from libgmp are copied into the libhogweed _import_
> library libhogweed.dll.a.  The import library is a static library.

I admit I don't understand all the fine details here. But that sounds
undesirable, the import library is intended to only contain thin glue to
the dll?

> But anyway, I think this is unworkable on Windows.  If Alexey doesn't
> want dependencies on shared libraries, he needs to build static
> libraries from libhogweed and libnettle (I think --disable-shared at
> configure time will achieve that effect).

Right, --disable-shared should do that.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.
_______________________________________________
nettle-bugs mailing list
[email protected]
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs

Reply via email to