我的命名空间.h:
namespace MyNamespace{
int a
}
MyNamespace.cpp:一些使用
主文件
#include "MyNamespace.h"
main.obj : error LNK2005: "class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > FileNamespace::m_rootDirectoryPath" (?m_rootDirectoryPath@FileNamespace@@3V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@A) already defined in FileNamespace.obj 1>main.obj : error LNK2005: "struct FileNamespace::FileTree FileNamespace::m_dataFileTree" (?m_dataFileTree@FileNamespace@@3UFileTree@1@A) already defined in FileNamespace.obj