Hi,
I'm having some trouble getting libev to compile on windows. I am
embedding it as recommended. Here are the errors I receive initially:
cl /nologo /TP /Ilib /c src\ev_cpp.cpp /Fobuild\ev_cpp.obj
ev_cpp.cpp
c:\mud\lib\ev\ev_win32.c(85) : error C3861: '_open_osfhandle': identifier not fo
und
c:\mud\lib\ev\ev_win32.c(86) : error C3861: '_open_osfhandle': identifier not fo
und
lib\ev/ev.c(708) : error C3861: '_get_osfhandle': identifier not found
lib\ev/ev.c(759) : error C3861: '_get_osfhandle': identifier not found
lib\ev/ev.c(773) : warning C4806: '==' : unsafe operation: no value of type 'boo
l' promoted to type 'int' can equal the given constant
lib\ev/ev.c(981) : error C3861: '_get_osfhandle': identifier not found
lib\ev/ev.c(1033) : error C3861: 'write': identifier not found
lib\ev/ev.c(1052) : error C3861: 'read': identifier not found
c:\mud\lib\ev\ev_select.c(137) : error C2065: 'NFDBITS' : undeclared identifier
lib\ev/ev.c(1365) : error C3861: 'close': identifier not found
lib\ev/ev.c(1366) : error C3861: 'close': identifier not found
lib\ev/ev.c(1376) : error C3861: 'close': identifier not found
lib\ev/ev.c(1461) : error C3861: 'close': identifier not found
lib\ev/ev.c(1462) : error C3861: 'close': identifier not found
I poked around and discovered that the "io.h" header has the
unreferenced functions. I added that in my ev_cpp.c file above the
ev.c include. This reduced the errors to the following:
cl /nologo /TP /Ilib /c src\ev_cpp.cpp /Fobuild\ev_cpp.obj
ev_cpp.cpp
lib\ev/ev.c(773) : warning C4806: '==' : unsafe operation: no value of type 'boo
l' promoted to type 'int' can equal the given constant
lib\ev/ev.c(981) : error C2664: 'ioctlsocket' : cannot convert parameter 3 from
'int *' to 'u_long *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-
style cast or function-style cast
c:\mud\lib\ev\ev_select.c(137) : error C2065: 'NFDBITS' : undeclared identifier
According to the docs, the NFDBITS problem should be fixed by defining
EV_SELECT_USE_FD_SET, which seems to be defined automatically for
windows.
Any pointers on this? I am using libev-3.41.
Thanks,
Matt
_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev