B-Abbasi
B-Abbasi

Reputation: 823

Building libcurl library in Visual Studio 2008

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

Upvotes: 0

Views: 4554

Answers (2)

B-Abbasi
B-Abbasi

Reputation: 823

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

Upvotes: 0

catscradle
catscradle

Reputation: 1719

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.

Upvotes: 1

Related Questions