python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
C++ undefined reference to 'WSAStartup@8' even though i linked ws2_32.lib
I use CodeBlocks, i've tried #pragma comment(lib, "ws2_32.lib") with and without giving a path, i tried adding it with linker settings, but it still shows the message, i even reinstalled Cod...
user17986576
Votes: 0
Answers: 1
gethostbyname says No such service is known. The service cannot be found in the specified name space
This simple piece of code in Windows results in an annoying debug message printed by gethostbyname.
#include <stdio.h>
#include <winsock.h>
int main()
{
WSADATA wsaData;
WSAStartup...

s4eed
Votes: 0
Answers: 1