首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Libcurl不支持https,但curl支持

Libcurl不支持https,但curl支持
EN

Stack Overflow用户
提问于 2022-03-03 06:44:16
回答 1查看 236关注 0票数 0

当我运行curl -V时,输出如下

代码语言:javascript
复制
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-svc

Https显然在那里。当我通过c++使用它时,通过使用curl_version_info_data

代码语言:javascript
复制
curl_version_info_data* ver = curl_version_info(CURLVERSION_NOW);
    for (int i = 0; i < 14; ++i) {
        cout << ver->protocols[i] << endl;
    }

所列支持的协议如下

代码语言:javascript
复制
dict
file
ftp
gopher
http
imap
ldap
mqtt
pop3
rtsp
smb
smtp
telnet
tftp

如果我尝试使用https,就会得到错误Unsupported protocol。有人有什么想法吗?

EN

回答 1

Stack Overflow用户

发布于 2022-03-03 08:46:01

我想明白了,在运行时,我尝试从预编译的Curl版本中获取libcurl.liblibcurl_imp.lib (我安装了两个版本)。预编译版本不支持https。我在这里阅读了FAQ,https://curl.se/docs/faq.html并正确地链接了静态库。后来,一切都很顺利。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71333059

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档