tshare/1.0 a fast way to share file using transfer.sh

Andrea Fontana nospam at example.org
Thu Oct 12 07:29:14 UTC 2023


On Wednesday, 11 October 2023 at 14:30:50 UTC, kinke wrote:
> On Saturday, 7 October 2023 at 22:40:58 UTC, Andrea Fontana 
> wrote:
>> Question:
>> - Is there a way to compile curl statically with ldc for 
>> windows? If I try (using -static), it throws a runtime error.
>
> Yes; IIRC, you need to link `curl_a.lib` *and* add `curl.exp` 
> (as Phobos tries to find the exported functions in the .exe 
> itself) to the linker cmdline too (both files in the LDC lib 
> dir).

You're right!

On dub this works:

```
dflags "-link-defaultlib-shared=false" platform="ldc"
dflags "-static" platform="windows"
lflags "curl_a.lib" "crypt32.lib" "wldap32.lib" "curl.exp" 
platform="windows"
```

Thank you,
Andrea


More information about the Digitalmars-d-announce mailing list