Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to include <sys/select.h> library in a Visual Studio C++ project?

I am a beginner with Visual Studio and now I want to run a C++ program on it, but when I compile the program there is an error that <sys/select.h> is not defined.

So, how can I define it or include it in the project?

like image 770
fank Avatar asked Aug 31 '25 23:08

fank


1 Answers

sys/select.h is a POSIX header that supports select(); the equivalent on Win32 only works on sockets, so you are unlikely to get the code working on Windows unless you are already skilled at porting.

like image 198
Ignacio Vazquez-Abrams Avatar answered Sep 03 '25 11:09

Ignacio Vazquez-Abrams