curl-library
Problems running libcurl based code in Windows XP
Date: Mon, 29 Mar 2010 21:28:39 +0200
Hello!
I'm trying to build an application with statically linked libcurl in Visual
Studio 2010 on Windows XP. The project builds successfully, but when i run
the application, i get this message:
"The procedure entry point WSAPoll could not be located in the dynamic link
library WS2_32.dll"
Some googling tells me that this is a known problem in libcurl on XP, and
could be solved by defining:
_WIN32_WINNT 0x0500
However, this results in a wall of errors:
1> tftp.c
1> sslgen.c
1> gtls.c
1> select.c
1>select.c(370): error C2036: 'pollfd *' : unknown size
1>select.c(370): error C2037: left of 'fd' specifies undefined struct/union
'pollfd'
1>select.c(419): error C2036: 'pollfd *' : unknown size
1>select.c(419): error C2037: left of 'revents' specifies undefined
struct/union 'pollfd'
1>select.c(420): error C2036: 'pollfd *' : unknown size
1>select.c(420): error C2037: left of 'fd' specifies undefined struct/union
'pollfd'
1>select.c(423): error C2036: 'pollfd *' : unknown size
1>select.c(423): error C2037: left of 'events' specifies undefined
struct/union 'pollfd'
1>select.c(423): error C2065: 'POLLIN' : undeclared identifier
1>select.c(423): error C2065: 'POLLOUT' : undeclared identifier
1>select.c(423): error C2065: 'POLLPRI' : undeclared identifier
1>select.c(424): error C2065: 'POLLIN' : undeclared identifier
1>select.c(424): error C2065: 'POLLOUT' : undeclared identifier
1>select.c(424): error C2065: 'POLLPRI' : undeclared identifier
1>select.c(425): error C2036: 'pollfd *' : unknown size
1>select.c(425): error C2037: left of 'fd' specifies undefined struct/union
'pollfd'
1>select.c(426): error C2036: 'pollfd *' : unknown size
1>select.c(426): error C2037: left of 'fd' specifies undefined struct/union
'pollfd'
1>select.c(427): error C2036: 'pollfd *' : unknown size
1>select.c(427): error C2037: left of 'events' specifies undefined
struct/union 'pollfd'
1>select.c(427): error C2065: 'POLLIN' : undeclared identifier
1>select.c(427): error C2065: 'POLLIN' : undeclared identifier
1>select.c(428): error C2036: 'pollfd *' : unknown size
1>select.c(428): error C2037: left of 'fd' specifies undefined struct/union
'pollfd'
1>select.c(428): error C2036: 'pollfd *' : unknown size
1>select.c(428): error C2037: left of 'fd' specifies undefined struct/union
'pollfd'
1>select.c(429): error C2036: 'pollfd *' : unknown size
1>select.c(429): error C2037: left of 'events' specifies undefined
struct/union 'pollfd'
1>select.c(429): error C2065: 'POLLOUT' : undeclared identifier
1>select.c(429): error C2065: 'POLLOUT' : undeclared identifier
1>select.c(430): error C2036: 'pollfd *' : unknown size
1>select.c(430): error C2037: left of 'fd' specifies undefined struct/union
'pollfd'
1>select.c(430): error C2036: 'pollfd *' : unknown size
1>select.c(430): error C2037: left of 'fd' specifies undefined struct/union
'pollfd'
1>select.c(431): error C2036: 'pollfd *' : unknown size
1>select.c(431): error C2037: left of 'events' specifies undefined
struct/union 'pollfd'
1>select.c(431): error C2065: 'POLLPRI' : undeclared identifier
1>select.c(431): error C2065: 'POLLPRI' : undeclared identifier
1>select.c(432): error C2036: 'pollfd *' : unknown size
1>select.c(432): error C2037: left of 'fd' specifies undefined struct/union
'pollfd'
1>select.c(432): error C2036: 'pollfd *' : unknown size
1>select.c(432): error C2037: left of 'fd' specifies undefined struct/union
'pollfd'
1>select.c(467): error C2036: 'pollfd *' : unknown size
1>select.c(467): error C2037: left of 'revents' specifies undefined
struct/union 'pollfd'
1>select.c(468): error C2036: 'pollfd *' : unknown size
1>select.c(468): error C2037: left of 'fd' specifies undefined struct/union
'pollfd'
1>select.c(470): error C2036: 'pollfd *' : unknown size
1>select.c(470): error C2037: left of 'fd' specifies undefined struct/union
'pollfd'
1>select.c(470): error C2198: '__WSAFDIsSet' : too few arguments for call
1>select.c(471): error C2036: 'pollfd *' : unknown size
1>select.c(471): error C2037: left of 'revents' specifies undefined
struct/union 'pollfd'
1>select.c(471): error C2065: 'POLLIN' : undeclared identifier
1>select.c(472): error C2036: 'pollfd *' : unknown size
1>select.c(472): error C2037: left of 'fd' specifies undefined struct/union
'pollfd'
1>select.c(472): error C2198: '__WSAFDIsSet' : too few arguments for call
1>select.c(473): error C2036: 'pollfd *' : unknown size
1>select.c(473): error C2037: left of 'revents' specifies undefined
struct/union 'pollfd'
1>select.c(473): error C2065: 'POLLOUT' : undeclared identifier
1>select.c(474): error C2036: 'pollfd *' : unknown size
1>select.c(474): error C2037: left of 'fd' specifies undefined struct/union
'pollfd'
1>select.c(474): error C2198: '__WSAFDIsSet' : too few arguments for call
1>select.c(475): error C2036: 'pollfd *' : unknown size
1>select.c(475): error C2037: left of 'revents' specifies undefined
struct/union 'pollfd'
1>select.c(475): error C2065: 'POLLPRI' : undeclared identifier
1>select.c(476): error C2036: 'pollfd *' : unknown size
1>select.c(476): error C2037: left of 'revents' specifies undefined
struct/union 'pollfd'
I also tried this (based on some other mailinglist post), but with the same
problem:
#define WINVER 0x0502
#define _WIN32_WINNT 0x0502
#define _WIN32_WINDOWS 0x0502
I tried both to add the different preprocessor definitions to config-win32.h
and to set them directly in the Visual Studio project properties, but
nothing works.
What is going on here?
Thanks in advance!
Henry Rodrick
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-03-29