我程序编完后,本想Build,但错点成Compile,结果再点Build就抱错,内容如下:
--------------------Configuration: Ex012c - Win32 Debug--------------------
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
ComputeDlg.cpp
Ex012c.cpp
Ex012cDoc.cpp
Ex012cView.cpp
MainFrm.cpp
Generating Code...
Linking...
Ex012c.obj : error LNK2005: "int g_nCount" (?g_nCount@@3HA) already defined in ComputeDlg.obj
Ex012c.obj : error LNK2005: "class CEvent g_eventStart" (?g_eventStart@@3VCEvent@@A) already defined in ComputeDlg.obj
Ex012c.obj : error LNK2005: "class CEvent g_eventKill" (?g_eventKill@@3VCEvent@@A) already defined in ComputeDlg.obj
Ex012cView.obj : error LNK2005: "int g_nCount" (?g_nCount@@3HA) already defined in ComputeDlg.obj
Ex012cView.obj : error LNK2005: "class CEvent g_eventStart" (?g_eventStart@@3VCEvent@@A) already defined in ComputeDlg.obj
Ex012cView.obj : error LNK2005: "class CEvent g_eventKill" (?g_eventKill@@3VCEvent@@A) already defined in ComputeDlg.obj
Debug/Ex012c.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.Ex012c.exe - 7 error(s), 0 warning(s)
我曾尝试把Debug文件夹删除,但仍然不起作用。