[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] libevent 1.4.x compile error on windows 7/8



On Thu, Apr 23, 2015 at 09:32:37AM -0500, Macrux wrote:
> Hi there,
> 
> I'm trying to build libevent 1.4.x  stable release on windows, using these
> steps:
> 
> 
>    - From there,* extract the libevent source *to the location of your
>    choice. Make note of this location, as you will need it later.
>    - Open the *Visual Studio Command Prompt* (or execute the appropriate
>    VCVARSALL.bat for your required environment in a terminal).
>    - Navigate to the location *where you extracted the libevent source*,
>    then execute the following commands: *nmake /F Makefile.nmake*


... snip

> 
> *http.c(145) : error C2011: 'addrinfo' : 'struct' type redefinition*
>         C:\Program Files (x86)\Microsoft
> SDKs\Windows\v7.0A\include\ws2def.h(841) : see declaration of 'addrinfo'
> 
> Right now I'm stucked since I need to build the libevent to be used in
> other project build. I will really appreciate any help you could give me.
> 
> Thanks in advance,
> 
> N??stor.


Try adding /DHAVE_GETADDRINFO to your CFLAGS, or if that fails, add

#ifndef HAVE_GETADDRINFO
#define HAVE_GETADDRINFO
#endif

somewhere above where the functions start in http.c
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.