To run a Linux program on Windows, I use cygwin. But the program that I run uses

#include <sys/epoll.h> 

When compiling in g ++, an error is generated

 "fatal error: sys/epoll.h: No such file or directory" 

What package need to be installed in cygwin to compile the program in the Windows operating system?

Linux compiled program actively uses epoll API.

  • Do you compile from under Windows? - Herrgott
  • one
    no. you need to install either Linux or virtual / analogs and Linux in it. Windows does not support epoll. - KoVadim
  • In my opinion, the compilation error "there is not enough file A" (No such file) says that you need to get and put the file A, namely epoll.h in the folder includes \ sys. If the functionality is not used, remove it from include or create an empty one. Download the epoll.h library from neta. - nick_n_a
  • one
    epool is a linux subsystem, all the same that you put the windows.h file in the build and hope that the Windows program will work under linux, epoll.h can probably be found in any linux system source code - pnp2000
  • one
    In fact, there is an attempt to simulate an epoll for cygwin, but how well it is successful, and how justified this approach is in general - not sure: github.com/fd00/cygepoll - PinkTux

1 answer 1

from comments:


Your program is not cross-platform. Alas. Rewrite it or ask the author to provide cross-platform.


you need to install either Linux or virtual / analogs and Linux in it. Windows does not support epoll.


epool is a linux subsystem, all the same that you put the windows.h file in the build and hope that the Windows program will work under linux, you can probably find epoll.h in any linux source code


In fact, there is an attempt to simulate an epoll for cygwin, but I am not sure how successful it is, and how justified this approach is in general: https://github.com/fd00/cygepoll