Guilherme Garcia da Rosa
Guilherme Garcia da Rosa

Reputation: 1030

Netinet and netdb not found, c++ network libraries

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.

Upvotes: 2

Views: 13223

Answers (1)

Guilherme Garcia da Rosa
Guilherme Garcia da Rosa

Reputation: 1030

I removed both netinet/in.h and netdb.h library, added and added the link: "-lwsock32", all working now.

Upvotes: 3

Related Questions