request.obj : error LNK2019: unresolved external symbol __imp__recv@16 referenced in function "private: int __thiscall Request::SendHTTP(char const *,char const *,unsigned char *,unsigned long,struct HTTPRequest *)" (?SendHTTP@Request@@AAEHPBD0PAEKPAUHTTPRequest@@@Z)

解决方案 »

  1.   

    具体地说,就是使用gethostbyname()等几个函数时出现的问题,请问如何解决?
      

  2.   

    #include "afxsock.h"
    初始化的时候要:
    AfxSocketInit(NULL);
      

  3.   

    对于连接错误,首先可以看出是什么函数。然后找到该函数所在的lib文件有N种方法可以使你的工程对这个LIB文件进行连接。Project->link页里添加使用#progra什么的命令,干脆直接将你的LIB加入到工程里来,注意:连接的路径要设置正确Tools->Options->direction