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

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



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
But I'm running on this error:
Note: I'm using MS Visual Studio 10 on Windows 7x64

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
C:\libevent-1.4.14b-stable>nmake /F Makefile.nmake

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.

ÂÂÂÂÂÂÂ cl /Iinclude /Icompat /IWIN32-Code /DWIN32 /DHAVE_CONFIG_H /I. /Ox /W3 /wd4996 /nologo /c WIN32-Code\win32.c
win32.c
WIN32-Code\win32.c(150) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
ÂÂÂÂÂÂÂ cl /Iinclude /Icompat /IWIN32-Code /DWIN32 /DHAVE_CONFIG_H /I. /Ox /W3 /wd4996 /nologo /c event.c buffer.c evbuffer.c log.c evutil.c strlcpy.c signal.c
event.c
buffer.c
buffer.c(203) : warning C4267: 'return' : conversion from 'size_t' to 'int', possible loss of data
buffer.c(320) : warning C4244: '=' : conversion from '__int64' to 'unsigned int', possible loss of data
buffer.c(321) : warning C4244: '=' : conversion from '__int64' to 'unsigned int', possible loss of data
buffer.c(460) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
buffer.c(502) : warning C4267: 'function' : conversion from 'size_t' to 'int', possible loss of data
evbuffer.c
evbuffer.c(111) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
log.c
evutil.c
evutil.c(98) : warning C4244: '=' : conversion from 'SOCKET' to 'int', possibleloss of data
evutil.c(111) : warning C4244: '=' : conversion from 'SOCKET' to 'int', possible loss of data
evutil.c(125) : warning C4244: '=' : conversion from 'SOCKET' to 'int', possible loss of data
strlcpy.c
signal.c
Generating Code...
 lib /nologo event.obj buffer.obj evbuffer.obj log.obj evutil.obj strlc py.obj signal.obj win32.obj /out:libevent_core.lib
ÂÂÂÂÂÂÂ cl /Iinclude /Icompat /IWIN32-Code /DWIN32 /DHAVE_CONFIG_H /I. /Ox /W3 /wd4996 /nologo /c event_tagging.c http.c evdns.c evrpc.c
event_tagging.c
event_tagging.c(149) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
event_tagging.c(204) : warning C4267: 'function' : conversion from 'size_t' to ' unsigned int', possible loss of data
event_tagging.c(211) : warning C4267: 'function' : conversion from 'size_t' to ' unsigned int', possible loss of data
event_tagging.c(223) : warning C4267: 'function' : conversion from 'size_t' to ' unsigned int', possible loss of data
event_tagging.c(231) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
http.c
http.c(102) : warning C4005: 'NI_NUMERICHOST' : macro redefinition
ÂÂÂÂÂÂÂ C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\ws2def.h(953) : see previous definition of 'NI_NUMERICHOST'
http.c(103) : warning C4005: 'NI_NUMERICSERV' : macro redefinition
ÂÂÂÂÂÂÂ C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\ws2def.h(955) : see previous definition of 'NI_NUMERICSERV'
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'
http.c(278) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
http.c(283) : warning C4267: '+=' : conversion from 'size_t' to 'int', possible loss of data
http.c(554) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
http.c(800) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
http.c(899) : warning C4018: '>=' : signed/unsigned mismatch
http.c(934) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
http.c(2284) : warning C4244: '=' : conversion from 'SOCKET' to 'int', possible loss of data
http.c(2739) : warning C4244: '=' : conversion from 'SOCKET' to 'int', possible loss of data
http.c(2762) : warning C4267: 'function' : conversion from 'size_t' to 'int', possible loss of data
http.c(2852) : warning C4267: 'function' : conversion from 'size_t' to 'int', possible loss of data
evdns.c
evdns.c(1000) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
evdns.c(1223) : warning C4267: 'function' : conversion from 'size_t' to 'int', possible loss of data
evdns.c(1402) : warning C4244: 'initializing' : conversion from '__int64' to 'const unsigned int', possible loss of data
evdns.c(1409) : warning C4244: '+=' : conversion from '__int64' to 'off_t', possible loss of data
evdns.c(1413) : warning C4244: 'initializing' : conversion from '__int64' to 'const unsigned int', possible loss of data
evdns.c(1420) : warning C4244: '+=' : conversion from '__int64' to 'off_t', possible loss of data
evdns.c(1657) : warning C4267: 'function' : conversion from 'size_t' to 'const int', possible loss of data
evdns.c(1676) : warning C4267: 'function' : conversion from 'size_t' to 'const int', possible loss of data
evdns.c(1688) : warning C4267: 'function' : conversion from 'size_t' to 'const int', possible loss of data
evdns.c(1736) : warning C4267: 'function' : conversion from 'size_t' to 'int', possible loss of data
evdns.c(2133) : warning C4244: '=' : conversion from 'SOCKET' to 'int', possible loss of data
evdns.c(2239) : warning C4267: 'initializing' : conversion from 'size_t' to 'const int', possible loss of data
evdns.c(2435) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
evdns.c(2494) : warning C4267: 'initializing' : conversion from 'size_t' to 'const int', possible loss of data
evrpc.c
evrpc.c(196) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
Generating Code...
NMAKE : fatal error U1077: 'C:\msvisualstudio\VC\BIN\amd64\cl.EXE' : return code '0x2'
Stop.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



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.