cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: build libcurl under win32

From: Yang Tse <yangsita_at_gmail.com>
Date: Wed, 14 Mar 2007 15:40:12 +0100

2007/3/14, Wei Weng wrote:

> .\hostip.h(107) : error C2061: syntax error : identifier 'socklen_t'
> .\hostip.h(111) : error C2059: syntax error : '}'

On Windows socklen_t is defined in ws2tcpip.h this header and lib can
only be used in winsock2 builds, it cannot be used with winsock1
builds.

lib/config-win32.h defines, among others, HAVE_WINSOCK2_H and
HAVE_WS2TCPIP_H. If you are building for a pre winsock2 target you
should undefine, comment out, HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H. In
this way lib/config-win32.h will provide a suitable replacement for
socklen_t.

If you are building for a winsock2 target then the error you are
getting is most probably a bad installation of VC6 in which system
headers are missing, or the compiler include paths are wrong.

By the way, lib/hostip4.h already includes lib/setup.h which includes
lib/config-win32.h if WIN32 is defined. So there is no need for any
additional include to get this working.

Check your compiler settings.

It is also advisable to install Platform SDK. If using VC6, at least
get February 2003 edition of Platform SDK.

-- 
-=[Yang]=-
Received on 2007-03-14