unresolved external symbol

Hi everyone,
i've got an error that i can't solve myself... This is it:

1>server.obj : error LNK2019: unresolved external symbol "void __cdecl HandleConnection2(void *)" (?HandleConnection2@@YAXPAX@Z) referenced in function "bool __cdecl RunServer(int)" (?RunServer@@YA_NH@Z)

HandleConnection2 is a thread like this:

void HandleConnection2(void *hdt);

I call this thread here:

_beginthread(HandleConnection2, 0, (void*)&hd);

hd is a structure i made:

struct HANDLING_DATA {
SOCKET hClientSocket;
sockaddr_in sockAddr;
};

I thought maybe i need some libraries, but 1. In the other project i did analogue action and it worked without additional libraries, and 2. I've tried to add one of the thread-releated library and got "already defined" errors. I haven't tried all of them of course.

Other people got similar error by either not having right libraries or missing those libraries in the actual project folder or writing _beginthread call incorrectly. Maybe someone had something like that too before?
have you actually defined (written out) those two functions HandleConnection2 and
RunServer somewhere in a cpp file, and is has that file been included in the compilation??
You actually were right! :D I had HandleConnection2 prototype, but the implementation i forgot to change name from the old one i used, so compiler compiled it i guess by thinking, that the unimplemented function is somewhere in the includes. Thx man :)
Topic archived. No new replies allowed.