libcurl on Windows with Visual Studio 2005
July 27th, 2007Developing on Windows can be a real pain. I spent a few hours looking around for an easy way to perform simple HTTP GET calls inside vanilla win32 code. What a pain. WinINet is a disaster and WinHTTP is not much better. It also isn’t supported on all the versions of Windows we target, argh.
It turns out that you can get libcurl [one of favorite libraries] to work on Windows within Visual Studio. Here is a quick overview how to make it happen with the 7.16.4 release.
Download the source and load lib\curllib.vcproj in Visual Studio
In curllib project properties->Configuration Properties->C/C++->Code Generation->Runtime Library change the value to Multi-Threaded /MT [assuming a release build] so it correctly builds as a static library
Then in the project you intend to use libcurl – in the preprocessor section, define CURL_STATICLIB and add the curl include directories
In the linker section add curllib.lib, ws2_32.lib, winmm.lib
Prosper
For good measure, I’ve uploaded a release build of this lib that you can link to in your project [skip steps 1 and 2]
-
Henry Baxter
-
Ron
-
Jeff
-
http://... Natko
-
Jeff
-
Anton
-
http://daniel.haxx.se/blog/2007/10/29/curl-references/ dblog » Blog Archive » curl references
-
Exorsus
-
http://fwga.blogspot.com Jani
-
http://blog.magnetk.com/2008/03/26/high-leverage-development/ Magnetk Blog » Blog Archive » High Leverage Development
-
Starbuck
-
Elise
-
Colin
-
Oak
-
Me
-
helper of ME
-
Kunsheng
-
http://www.hemispheregames.com Eddy B
-
sedwo
-
Gagan
-
Sak
-
Christophe BIDAL
-
John
-
http://www.browsarity.com shaimagz
-
sxj
-
http://developtolearn.blogspot.com Antonio Vázquez
