如何使用cUrl和OpenSSL [英] How to use cUrl and OpenSSL
问题描述
我从此页面下载了所有内容 http://curl.haxx.se/download.html。使用 mingw32-make mingw32-ssl-zlib 构建libcurl,将接收到的libcurl.a和libcurldll.a放入我的lib文件夹。我也添加到我的包含文件夹所有OpenSSL头。我必须提到,在我构建cUrl没有OpenSSL之前,它的工作。我尝试使用
I downloaded everything from this page http://curl.haxx.se/download.html . Build libcurl with mingw32-make mingw32-ssl-zlib, put received libcurl.a and libcurldll.a into my lib folder. I also added into my include folder all OpenSSL headers. I must mentioned, that before I build cUrl without OpenSSL, and it worked. I tried to compile with
g++ -DCURL_STATICLIB -DUSE_SSLEAY -DUSE_OPENSSL -ID:\Workspacee\Uploader\src\openssl -O0 -g3 -Wall -c -fmessage-length=0 -osrc\main.o ..\src\main.cpp
但我收到了很多错误 - 这里他们都 http://pastebin.com / YmYPu9BA
but I received a lots of errors - here they all http://pastebin.com/YmYPu9BA
有人可以帮助我吗?我做错了什么?
Can someone help me? What am I did wrong?
推荐答案
正如我在您的前面的问题导致这一个,如果你链接静态,最终的可执行文件将需要所有的依赖库显式链接。OpenSLL代码不存在于libcurl静态库。
As I said in your previous question the lead to this one, if you link statically, the final executable will need all dependent libraries explicitely linked in. The OpenSLL code is not present in the libcurl static library.
只需添加与构建libcurl时相同的OpenSSL链接器标记。
Just add the same OpenSSL linker flags as you did when building libcurl.
这篇关于如何使用cUrl和OpenSSL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!