[Issue 20690] Static LibCurl

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 22 14:52:26 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=20690

--- Comment #6 from kinke <kinke at gmx.net> ---
(In reply to kinke from comment #5)
> In that case, the custom static curl library will almost certainly need to
> be built with a special config, using `__declspec(dllexport)` for the
> implementations, so that the executable will export the symbols for
> GetProcAddress() usage.

Nope, it's simpler than that - the linker just needs the .exp file
(auto-generated when building the DLL, just like the import library) as
additional input file when linking the executable (besides the static curl
library of course). The executable then features the exports, and std.net.curl
works as expected. See https://github.com/ldc-developers/ldc/issues/3376 (incl.
a link to a prebuilt package).

--


More information about the Digitalmars-d-bugs mailing list