Im using cygwin to test the code of a server I am writing.
I've included sys/types.h, sys/socket.h, netdb.h, and arpa/inet.h.
And this is the output..
I checked the sys/socket file, and it includes cygwin/socket, which doesnt declare any functions. And getaddrinfo is not declared in sys/socket.
I take it I am missing some sort of package, but which one?
(And by the way, is there any other way to tell g++ where to put the .object files rather than being the object dir when running g++?)
I've included sys/types.h, sys/socket.h, netdb.h, and arpa/inet.h.
And this is the output..
Code:
../../../sockets.cpp: In constructor `network_class::network_class()': ../../../sockets.cpp:64: error: aggregate `addrinfo hints' has incomplete type a nd cannot be defined ../../../sockets.cpp:69: error: `getaddrinfo' undeclared (first use this functio n) ../../../sockets.cpp:69: error: (Each undeclared identifier is reported only onc e for each function it appears in.) ../../../sockets.cpp:70: error: `gai_strerror' undeclared (first use this functi on) ../../../sockets.cpp: In destructor `network_class::~network_class()': ../../../sockets.cpp:83: error: `freeaddrinfo' undeclared (first use this functi on) main.o:main.cpp:(.text+0x148): undefined reference to `network_class::gethostnam e()' collect2: ld returned 1 exit status
I take it I am missing some sort of package, but which one?
(And by the way, is there any other way to tell g++ where to put the .object files rather than being the object dir when running g++?)
Comment