Greetings all!
I have been having this issue for a while. I cannot compile anything with winsock.
i attempted to compile http://msdn.microsoft.com/en-us/library/ms737593(VS.85).aspx i included all the requred libraries but it would still not compile. it says
Quoteerror: `getaddrinfo' was not declared in this scope
error: `freeaddrinfo' was not declared in this scope
which are in "ws2tcpip.h"
Any help please?
P.S
the code compiles fine when i use Dev-C++ but i personal prefer C::B :lol:
Ok solution for those of you who have stumbled upon this while searching for the solution to the same problem
add:
#define _WIN32_WINNT
#define _WIN32_WINNT 0x501
Before your includes.
You would think Code::Blocks would do it for you... <_<
Quote from: astropirate on April 22, 2009, 07:05:20 AM
You would think Code::Blocks would do it for you... <_<
Why should it? What if I want to pass a different version?
It's up to the developer to pass needed DEFINES as arguments to the compiler. Check your project options -> Compiler -> Defines.