0

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

Community
  • 1
  • 1
B-Abbasi
  • 813
  • 2
  • 17
  • 38
  • 2
    Uhm, 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. – catscradle Sep 04 '13 at 08:46
  • you are a life saver @catscradle . you pointed out the exact problem.. Thanks a lot. – B-Abbasi Sep 04 '13 at 09:14
  • I'll post it as an answer then :P – catscradle Sep 04 '13 at 09:46

2 Answers2

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.

catscradle
  • 1,709
  • 11
  • 18
0

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

B-Abbasi
  • 813
  • 2
  • 17
  • 38