title: unresolved external symbol "cSocket::cSocket(void)" in function _main
body: <pre><code>#ifndef _ClientSocket_H_
  #define _ClientSocket_H_
  
  #include "Includes.h"
  #include "LOGMSGs.h"
  
  class cSocket
  {
  public:
      cSocket();
      bool Open();
      bool Listen(char *OnIP,int OnPort);
      void Send(char *MSG, int len);
      void Recv(char *MSG,int len);
      void Close();
  protected:
      SOCKET  cSock;
      const int   SndBuf;
  };
  
  #endif
  
  
  #include "ClientSocket.h"
  
  
  bool cSocket::Open()
  {
      WSADATA wsaData;
      int err;
      if((err =WSAStartup(0x202, &amp;wsaData)) !=0)
      {
          Error("Init WSAStartup() failed[%d].", err);
          return false;
      }
      return true;
  }
  
  bool cSocket::Listen(char *OnIP,int OnPort)
  {
      if(Open())
      {
          //Create the main socket
          cSock=socket(AF_INET, SOCK_STREAM, 0);
          if(cSock==INVALID_SOCKET)
          {
              int err = WSAGetLastError();
              //WSACleanup();
              printf("Init socket() failed[%d].", err);
              return FALSE;
          }
  
          //Set the REUSEADDR SOCKET
          int     optval = 1;
          if(setsockopt(cSock, SOL_SOCKET, SO_REUSEADDR, (char *) &amp;optval, sizeof(optval)))
          {
              int err = WSAGetLastError();
              Close();
              printf("Init setsockopt() SO_REUSEADDR failed[%d].", err);
              return FALSE;
          }
  
          //Set the KEEPALIVE SOCKET
          optval = 1;
          if(setsockopt(cSock, SOL_SOCKET, SO_KEEPALIVE, (char *) &amp;optval, sizeof(optval)))
          {
              int err = WSAGetLastError();
              Close();
              printf("Init setsockopt() SO_KEEPALIVE failed[%d].", err);
              return FALSE;
          }
  
              // Set the SNDBUF SOCKET
          if(SndBuf)      // Non-0: pointer SNDBUG
          {
              optval = SndBuf;
              if(setsockopt(cSock, SOL_SOCKET, SO_SNDBUF, (char *) &amp;optval, sizeof(optval)))
              {
                  int err = WSAGetLastError();
                  Close();
                  printf("Init setsockopt() SO_SNDBUF failed[%d].", err);
                  return FALSE;
              }
  
              // Read the SNDBUF SOCKET
              int ret = sizeof(optval);
              if(getsockopt(cSock, SOL_SOCKET, SO_SNDBUF, (char *) &amp;optval, &amp;ret) == 0)
              {
                  LOGMSG("send buffer size SOCKET [%d] K.", optval/1024);
              }
          }
  
          SOCKADDR_IN     sin;
          memset(&amp;sin, 0, sizeof(sin));
          sin.sin_family      = AF_INET;
          sin.sin_addr.s_addr = inet_addr(OnIP);
          sin.sin_port        = htons(OnPort);
          if(bind(cSock, (LPSOCKADDR) &amp;sin, sizeof(sin)))
          {
              int err = WSAGetLastError();
              Close();
              printf("Init bind() failed[%d].", err);
              return FALSE;
          }
  
          //Set to non-blocking mode
          unsigned long   i = 1;
          if(ioctlsocket(cSock, FIONBIO, &amp;i))
          {
              int err = WSAGetLastError();
              Close();
              printf("Init ioctlsocket() failed[%d].", err);
              return FALSE;
          }
  
          //Listening port
          if(listen(cSock, SOMAXCONN))        // SOMAXCONN: WIN macro definition
          {
              int err = WSAGetLastError();
              Close();
              printf("Init listen() failed[%d].", err);
              return FALSE;
          }
          return true;
      }
  return false;
  }
  
  
  void cSocket::Close()
  {
      closesocket(cSock);
      WSACleanup();
  }
  
  
  #include "Includes.h"
  #include "LOGMSGs.h"
  #include "auth_proto.h"
  #include "Packets.h"
  #include "ClientSocket.h"
  
  
  int main(int argc, char* argv[]) 
  {
      cSocket sock;
      while(1)
      {
          sock.Open();
          sock.Listen("127.0.0.1",4444);
      }
      return 0;
  }
  </code></pre>
  
  <blockquote>
    <p>Error: unresolved external symbol "public: __thiscall cSocket::cSocket(void)" (??0cSocket@@QAE@XZ) referenced in function _main</p>
  </blockquote>
  
  <p>what's wrong?</p>