Re: curl error msg

2022-02-20 Thread Anonymouse via Digitalmars-d-learn

On Saturday, 19 February 2022 at 13:12:32 UTC, MichaelBi wrote:
when running the example in the std.net.curl on my windows, got 
following msg:


std.net.curl.CurlException@std\net\curl.d(4239): Failed to load 
curl, tried "libcurl.dll", "curl.dll"


does it mean i don't have those dll files? thx.


Are you running it from a WSL session? I get libcurl.dll errors 
(although a graphical popup) when I run my thing from in there, 
but it works well from a normal command console and/or Powershell.


Re: curl error msg

2022-02-20 Thread frame via Digitalmars-d-learn

On Saturday, 19 February 2022 at 13:12:32 UTC, MichaelBi wrote:
when running the example in the std.net.curl on my windows, got 
following msg:


std.net.curl.CurlException@std\net\curl.d(4239): Failed to load 
curl, tried "libcurl.dll", "curl.dll"


does it mean i don't have those dll files? thx.


A libcurl.dll comes with the installer. It can be found by your 
program if it's located in the same folder as the executable or 
if the %PATH% environment variable contains the directory where 
the installer puts the DLL in.


You may find this path in the environment variable but it has to 
match 32/64bit. If your 64bit program tries to load the 32bit 
variant it will fail to load.


It's likely that your %PATH% environment variable contains the 
32bit path (eg. for DMD `C:\install-dir\dmd2\windows\bin` but not 
the path to `\bin64`.


So you have to adjust the environment variable or copy the DLL 
from this path to your program executable.


curl error msg

2022-02-19 Thread MichaelBi via Digitalmars-d-learn
when running the example in the std.net.curl on my windows, got 
following msg:


std.net.curl.CurlException@std\net\curl.d(4239): Failed to load 
curl, tried "libcurl.dll", "curl.dll"


does it mean i don't have those dll files? thx.