问题
I was trying to run example codes to learn how to use winsock on c++ from the following links: http://www.linuxhowtos.org/data/6/client.c http://www.linuxhowtos.org/data/6/server.c
and the following libraries:
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
was not at the default mingw libraries, and by trying to google it wasn't much of a success because it end up requiring other libraries to run.
if anyone have a link to the full library or it with the dependencies, i would appreciate it.
Thanks in advance.
回答1:
I removed both netinet/in.h and netdb.h library, added and added the link: "-lwsock32", all working now.
来源:https://stackoverflow.com/questions/15561169/netinet-and-netdb-not-found-c-network-libraries