Friday, November 20, 2009

Socket programming under Cygwin

Wrote a simple socket program on Cygwin, tried to compile it and got an error saying sockaddr_in wasn't defined. A lot of head scratching and adding random header files, I gave up and Googled for the answer. For whatever reason, socket programming under cygwin wants you to add

#include <cygwin/in.h>

tip found at:
http://www.ureader.de/msg/1186183.aspx

No comments: