想写一个远程控制的,用socket,定义了一个数据结构:
struct InfoData{
char Info[4];
DWORD dwSize;
WORD nCommand;
WORD nReserved;
char Msg[200];
};声明struct InfoData *pInfo, SendInfo;在编译的时候怎么就
--------------------Configuration: MyClient - Win32 Debug--------------------
Compiling...
MyClientDlg.cpp
Generating Code...
Compiling...
MyClient.cpp
Generating Code...
Linking...
MyClientDlg.obj : error LNK2005: "struct InfoData * pInfo" (?pInfo@@3PAUInfoData@@A) already defined in MyClient.obj
MyClientDlg.obj : error LNK2005: "struct InfoData SendInfo" (?SendInfo@@3UInfoData@@A) already defined in MyClient.obj
MyClientDlg.obj : error LNK2005: "void * hDib" (?hDib@@3PAXA) already defined in MyClient.obj
MyClientDlg.obj : error LNK2001: unresolved external symbol "long __cdecl GetLocal_in_addr(void)" (?GetLocal_in_addr@@YAJXZ)
Debug/MyClient.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.MyClient.exe - 5 error(s), 0 warning(s):(