#include "Winsock2.h"//CWnd *m_pWnd = NULL;CWnd *m_pWnd = NULL;
class CDlgMain : public CDialog
{
// Construction
public:
CDlgMain(CWnd* pParent = NULL); // standard constructor
~CDlgMain()
{
//ClntCloseNetwork();
//SerCloseNetwork();
if(!(m_shareInfo==NULL))
{
        m_shareInfo=NULL;
}
        if(!(m_hShareInfo==NULL))
{
         m_hShareInfo=NULL;
}
}
HANDLE m_hShareInfo; typedef struct share_info3d
{
double cx,cy;
double w,h;
}SHARE_INFO3D; SHARE_INFO3D *m_shareInfo;
我在程序开始的头文件定义了CWnd *m_pWnd = NULL;
可编译时候说我已经定义了 我确实没在任何地方定义过它 是为什么呢?--------------------Configuration: ProjectBSEICommunicationsSoftware - Win32 Debug--------------------
Linking...
ProjectBSEICommunicationsSoftware.obj : error LNK2005: "class CWnd * m_pWnd" (?m_pWnd@@3PAVCWnd@@A) already defined in CDlgMain.obj
ProjectBSEICommunicationsSoftware.obj : error LNK2005: "void * m_hShareInfo" (?m_hShareInfo@@3PAXA) already defined in CDlgMain.obj
ProjectBSEICommunicationsSoftware.obj : error LNK2005: "struct share_info3d * m_shareInfo" (?m_shareInfo@@3PAUshare_info3d@@A) already defined in CDlgMain.obj
ProjectBSEICommunicationsSoftware.obj : error LNK2005: "unsigned int ServerSock" (?ServerSock@@3IA) already defined in CDlgMain.obj
ProjectBSEICommunicationsSoftware.obj : error LNK2005: "unsigned int ClntSock" (?ClntSock@@3IA) already defined in CDlgMain.obj
CDlgMain.obj : error LNK2001: unresolved external symbol __imp__send@16
CDlgMain.obj : error LNK2001: unresolved external symbol __imp__listen@8
CDlgMain.obj : error LNK2001: unresolved external symbol __imp__WSAAsyncSelect@16
CDlgMain.obj : error LNK2001: unresolved external symbol __imp__bind@12
CDlgMain.obj : error LNK2001: unresolved external symbol __imp__inet_addr@4
CDlgMain.obj : error LNK2001: unresolved external symbol __imp__htons@4
CDlgMain.obj : error LNK2001: unresolved external symbol __imp__inet_ntoa@4
CDlgMain.obj : error LNK2001: unresolved external symbol __imp__gethostbyname@4
CDlgMain.obj : error LNK2001: unresolved external symbol __imp__WSACleanup@0
CDlgMain.obj : error LNK2001: unresolved external symbol __imp__closesocket@4
CDlgMain.obj : error LNK2001: unresolved external symbol __imp__socket@12
CDlgMain.obj : error LNK2001: unresolved external symbol __imp__WSAStartup@8
CDlgMain.obj : error LNK2001: unresolved external symbol __imp__accept@12
CDlgMain.obj : error LNK2001: unresolved external symbol __imp__WSAGetLastError@0
CDlgMain.obj : error LNK2001: unresolved external symbol __imp__recv@16
CDlgMain.obj : error LNK2001: unresolved external symbol __imp__connect@12
Debug/ProjectBSEICommunicationsSoftware.exe : fatal error LNK1120: 16 unresolved externals
Error executing link.exe.ProjectBSEICommunicationsSoftware.exe - 22 error(s), 0 warning(s)