[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



Thanks Mark,

I replace the last command with this:

run nmake /F Makefile.nmake libevent_core.lib

And the error disappeared. I had forgotten to post this. Anyway, many thanks for your answer, if I need to build libevent again, I will follow your advice and post here the outcome.

Kind regards,

On 14 May 2015 at 23:17, Mark Ellzey <mthomas@xxxxxxxxxx> wrote:
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.