curl - 使用curlpp编译时出错

标签 curl compiler-errors undefined-reference curlpp

我尝试先编译simple example,然后看到编译错误:对`curlpp::Cleanup::Cleanup()的 undefined reference

在链接器选项中,我在命令行中编写了curl-config --libs

$ curl-config --libs

-lcurl

我究竟做错了什么?

最佳答案

您不想针对纯C curl(-lcurl)链接程序,而是针对curlpp!请改用-lcurlpp。您也可以调用curlpp-config --libs

不要忘记:curl(不带“pp”)是一个C库,C++库称为curlpp

关于curl - 使用curlpp编译时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2262437/

相关文章:

php - 是否可以为非您拥有的站点/服务器设置 cookie?

c++ - C++中的模板类-链表的编写开始时遇到问题

c++ - 对 'abc::abc()' 的 undefined reference ,矮错误 : Offset appearing

c++ - 为什么模板只能在头文件中实现?

c++ - 未定义对静态成员的引用

api - 如何排查与 Google Adsense API 的连接问题

php - 在postman中使用phpcurl上传文件到Nextcloud但上传的文件是空的

c++ - (C++) CURL_STATICLIB : No such file or directory

powershell - 从Powershell编译名称为1.0的gcc库

c++ - 什么是 undefined reference /未解析的外部符号错误以及如何修复它?