I've been trying to get started with sockets programming. However, when I try to use the getaddrinfo and freeaddrinfo functions, my linker complains that they are "not declared in this scope" and that they are "unused variables". I have checked the header (ws2tcpip.h) and the headers appear to be declared correctly. I have tried linking to libws2_32.a ( the Code::Blocks version of ws2_32.lib) but the linker reacts the same whether or not the library is included.
Why are these functions not working?