[Linker error] undefined reference to `WSAStartup@8'
[Linker error] undefined reference to `socket@12'
[Linker error] undefined reference to `WSAStartup@8'
[Linker error] undefined reference to `socket@12'
[Linker error] undefined reference to `closesocket@4'
[Linker error] undefined reference to `htonl@4'
[Linker error] undefined reference to `htons@4'
[Linker error] undefined reference to `bind@12'
[Linker error] undefined reference to `listen@8'
[Linker error] undefined reference to `accept@12'
[Linker error] undefined reference to `socket@12'
[Linker error] undefined reference to `inet_addr@4'
[Linker error] undefined reference to `gethostbyname@4'
[Linker error] undefined reference to `htons@4'
[Linker error] undefined reference to `connect@12'
[Linker error] undefined reference to `send@16'
[Linker error] undefined reference to `recv@16'
ld returned 1 exit status
解决办法:
pro文件中加LIBS += libwsock32 libWs2_32