gpt4 book ai didi

c++ - 在 Visual C++ 中使用时 curl 错误

转载 作者:塔克拉玛干 更新时间:2023-11-03 07:19:52 25 4
gpt4 key购买 nike

#include "stdafx.h"
#include <iostream>
#include "curl\curl.h"
#include "curl\easy.h"

using namespace std;

int main ()
{
CURL *curl;
CURLcode res;
curl = curl_easy_init ();
if (curl)
{
curl_easy_setopt (curl, CURLOPT_URL, "http://www.google.com");
res = curl_easy_perform (curl);
curl_easy_cleanup (curl);
}
return 0;
}

运行它给我一个错误:“The ordinal 3109 could not be located in the dynamic link library LIBEAY32.dll”

我添加了所需的 dll 和库,但仍然得到它。

有什么想法吗?

最佳答案

似乎 Curl 是针对与您安装的版本不同的 OpenSSL 版本构建的 - 检查您正在使用的 Curl 版本是针对哪个版本的 OpenSSL 构建的,并使用正确的 OpenSSL 二进制文件。如果那不可能,您可以使用您正在使用的 OpenSSL 版本的开发包进行重建。

关于c++ - 在 Visual C++ 中使用时 curl 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27980411/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com