Mateusz Loskot :: hacking on, working out, living up

Building libcurl with Visual C++ 2008

18 Dec 2007 | mloskot

cURL logoToday, I’ve been testing GDAL builds using Visual C++ 2008 Express Edition, compiler version 9.0. There are few drivers based on libcurl, so I needed to build this library as well. I used curl 7.17.1 (released in Oct 29, 2007) and it almost worked. In order to build libcurl using Visual C++, small patch required for lib/config-win32.h file:

/* Define to make select.h work fine on VC++ 9.0 (2008) */
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
/* The poll struct and associated defines are present in the Windows SDK v6.0 that comes with this version... */

It’s correct to assume all pre-7.17.1 also need this patch. This patch has been applied to the cURL CVS and should be available in next future. Thanks to Daniel Stenberg for assistance on the #curl channel.

Fork me on GitHub