#more then 100err with "winsock2"

32 messages · Page 1 of 1 (latest)

abstract edge
#

relying on other sources i thinks the problem is in my PC

sharp helmBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

abstract edge
#

code: #include <iostream>

#include <windows.h>
#include <WinSock2.h>
#include <WS2tcpip.h>

#pragma comment (lib, "Ws2_32.lib")

int main(int argc, char** args)
{
WSADATA wsaData;
int iResult = WSAStartup(MAKEWORD(2, 2), &wsaData);
if (iResult != 0) {
std::cerr << "WSAStartup failed: " << iResult << std::endl;
return 1;
}

std::cout << "Hello World!\n";

WSACleanup();
return 0;

}

mint cobalt
#

Uhh can you set error msgs to english

#

Or translate

#

And show the big error

abstract edge
#

shure, just a second

#

am i need to install some winSDK packeges&

mint cobalt
abstract edge
#

k

#

it's quite big

mint cobalt
#

yeah

#

just paste it here/pastebin

abstract edge
mint cobalt
#

do you have header guards in your headers?

#

ah nvm

abstract edge
#

not my packeges

mint cobalt
#

include winsock stuff before windows.h

#

so either include windows.h first or before #include <windows.h> write #define _WINSOCKAPI_

abstract edge
#

bruuuuuuhhhh it works

#

thanks a lot

mint cobalt
#

usually errors are the first ones

#

in that big text

#

everything after that is the issue from that error usually

abstract edge
#

i'l remember

mint cobalt
#

i believe its !solved to close the channel

abstract edge
#

!solved

sharp helmBOT
#

Thank you and let us know if you have any more questions!

This thread is now set to auto-hide after an hour of inactivity