当我运行curl -V时,输出如下
curl 7.82.0-DEV (x86_64-pc-win32) libcurl/7.82.0-DEV OpenSSL/1.1.1m WinIDN
Release-Date: [unreleased]
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS HSTS HTTPS-proxy IDN IPv6 Kerberos Largefile NTLM SPNEGO SSL SSPI UnixSockets alt-svcHttps显然在那里。当我通过c++使用它时,通过使用curl_version_info_data
curl_version_info_data* ver = curl_version_info(CURLVERSION_NOW);
for (int i = 0; i < 14; ++i) {
cout << ver->protocols[i] << endl;
}所列支持的协议如下
dict
file
ftp
gopher
http
imap
ldap
mqtt
pop3
rtsp
smb
smtp
telnet
tftp如果我尝试使用https,就会得到错误Unsupported protocol。有人有什么想法吗?
发布于 2022-03-03 08:46:01
我想明白了,在运行时,我尝试从预编译的Curl版本中获取libcurl.lib和libcurl_imp.lib (我安装了两个版本)。预编译版本不支持https。我在这里阅读了FAQ,https://curl.se/docs/faq.html并正确地链接了静态库。后来,一切都很顺利。
https://stackoverflow.com/questions/71333059
复制相似问题