build curl on windows using visual studio

1. download curl-7.27.0.zip

2. unzip to a folder

3. tried to used the provided make file, not working on windows 7 + visual studio 2010, decided to make a vc project by myself

4. create a new vc project file called vc-curl, add the relative c++ files (based on the make file), include the folders, etc, blah blah, anything, the first version

    works(tried use it in command line, no ssl support, but can use http to download web pages, great :)

5. the vcx project is here : /Files/sliencer/VC_Curl.7z

6. to enable ssl, I need a ssl library, I decided to use openSSL

7. download the openssl and build it (refer to another post)

8. add following macro to compile definition: USE_SSLEAY;USE_OPENSSL;

9. add the 2 libs created by openssl

10. build

11. when run it, we need to copied the dlls of openssl, otherwise an error will pop up.

12. Here's the vcx project file of using open ssl + curl . /Files/sliencer/VC_Curl_SSL.7z

13. the end.

 

 

BTW, if wanna build using mingw, simple call make -f Makefile(make is gnu make, not nmake)

 

 

posted on 2012-09-20 14:59  learner  阅读(425)  评论(0编辑  收藏  举报

导航