无法使用 OpenSSL 构建 libcUrl
我正在使用 mingw。我从 http://curl.haxx.se/download.html 链接下载了 OpenSSl 和 zlib视窗。将所有 makefile32.m32 中的路径更改为 openSSl 和 Zlib。尝试使用 mingw32-make mingw32-ssl-zlib 进行构建,但是当我遇到错误时,我不明白为什么:(
错误是
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -lssl32
collect2: ld returned 1 exit status
mingw32-make[1]: *** [libcurl.dll] Error 1
mingw32-make[1]: Leaving directory `c:/curl/lib'
mingw32-make: *** [mingw32-ssl] Error 2
我对 makefile 进行了更多更改。添加了 openSSl 库的写入路径。但我有两个库:libeay32.a 和 ssleay32.a。makefile 中的选项是curl_LDADD += -L$(OPENSSL_PATH)\lib\MinGW -leay32 -lssl32 当我将 -lssl32 更改为 -lssleay32 时,同样的错误是 - 找不到 -lssleay32
I'm using mingw. I downloaded OpenSSl and zlib from http://curl.haxx.se/download.html links for Windows. Change paths to openSSl and Zlib in all makefile32.m32. Try to build with mingw32-make mingw32-ssl-zlib But when I got errors, I don't understand why :(
Erorrs are
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -lssl32
collect2: ld returned 1 exit status
mingw32-make[1]: *** [libcurl.dll] Error 1
mingw32-make[1]: Leaving directory `c:/curl/lib'
mingw32-make: *** [mingw32-ssl] Error 2
I changed makefile a bit more. added write paths to the openSSl libs. But I've got there two libs: libeay32.a and ssleay32.a. And option in makefile is curl_LDADD += -L$(OPENSSL_PATH)\lib\MinGW -leay32 -lssl32. When I change -lssl32 to -lssleay32, the same error is - cannot find -lssleay32
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
OpenSSL 与库命名不一致,具体取决于库的编译方式。它也咬过我一次。确保您拥有
makefile 所需的文件或名称。
lib
前缀在这里非常重要,否则你的链接器将找不到它。OpenSSL is not consistent with library naming, depending on how the libraries were compiled. It bit me once too. Make sure you have the files
Or names the makefile expects. The
lib
prefix is very important here, otherwise your linker won't find it.