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

Re: [Libevent-users] build libevent2 in windows without thread support



yes,i do not need iocp.because my project is cross platform.iocp is diffrient from select,epoll..

i have tried ,but it's not success.
the nmake report follow errors:
    nmake /F Makefile.nmake static_libs
evthread_win32.c(300) : error C2079: 'cbs' uses undefined struct 'evthread_lock_callbacks'
evthread_win32.c(301) : error C2065: 'EVTHREAD_LOCK_API_VERSION' : undeclared identifier
evthread_win32.c(302) : error C2065: 'EVTHREAD_LOCKTYPE_RECURSIVE' : undeclared identifier
evthread_win32.c(302) : error C2078: too many initializers
evthread_win32.c(310) : error C2079: 'cond_cbs' uses undefined struct 'evthread_condition_callbacks'
evthread_win32.c(311) : error C2065: 'EVTHREAD_CONDITION_API_VERSION' : undeclared identifier
evthread_win32.c(312) : error C2078: too many initializers
evthread_win32.c(327) : warning C4013: 'evthread_set_lock_callbacks' undefined; assuming extern returning int
evthread_win32.c(328) : warning C4013: 'evthread_set_id_callback' undefined; assuming extern returning int
evthread_win32.c(335) : warning C4013: 'evthread_set_condition_callbacks' undefined; assuming extern returning int 

then i edit the Makefile.nmake file,remove the 'evthread_win32.obj'. build finaly success.


2012/11/16 Nick Mathewson <nickm@xxxxxxxxxxxxx>

On Thu, Nov 15, 2012 at 9:01 PM, JiangHao <jaxecn@xxxxxxxxx> wrote:
i only use select in windows,and don't care about thread.so i want to build libevent2 without thread support,then I edit the event-config.h,add #define _EVENT_DISABLE_THREAD_SUPPORT,and 
use nmake to build libevent2.
is that ok?do i missing something?

Hm. I seem to recall that thread support is required in windows, or IOCP can't work.

That said, if you wanted to try disabling thread support, and you also don't use IOCP, the step you describe might well work for building thread-free with nmake : give it a try and see whether more fixes are needed?

-- 
Nick