Building libcurl library in Visual Studio 2008

巧了我就是萌 提交于 2019-12-12 02:48:22

问题


I am trying to build libcurl from its source code. I have tried almost everything that has been answered on any forum ever but no success. Can anyone please tell me how to do it?

I found this question Building libcurl library in c++, Noob Question but the solution doesn't work for me

then I found this guide http://curl.haxx.se/libcurl/c/Using-libcurl-with-SSH-support-in-Visual-Studio-2008.pdf I followed every step, things went smooth until the end of section 3.4 of document, when I try to build libSSH2 it shows error

fatal error LNK1181: cannot open input file 'libeay32.lib;ssleay32.lib'

the possible reasons for this error are that path contains "Spaces" but my path was

  C:\openssl_lib\lib

as written in the document(without spaces). When I couldn't find any solution I even renamed the folder

"openssl_lib" to "openssllib" 

just to make sure that "_" character was not the reason for this error but no use.

Then I found that sometimes Linker causes problem if "lib" prefix is not present in names of libraries. I renamed the library files manually to

 libeay32.lib and libssleay32.lib

but this does not solve the issue either.

I have spent almot 8 hours going through all the trouble again and again , I am too frustrated now so please help...

Environment details: Windows 7 64-bit Visual Studio 2008


回答1:


Make sure libeay32.lib and ssleay32.lib are on the separate lines in the linker config. The error message cannot open input file 'libeay32.lib;ssleay32.lib' shows that it's looking for a single file with this weird name.




回答2:


For anyone looking to build libcurl in future:

Here are links to complete guides on different versions of visual studio.

http://curl.haxx.se/libcurl/c/Using-libcurl-with-SSH-support-in-Visual-Studio-2008.pdf

http://curl.haxx.se/libcurl/c/Using-libcurl-with-SSH-support-in-Visual-Studio-2010.pdf



来源:https://stackoverflow.com/questions/18607953/building-libcurl-library-in-visual-studio-2008

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!