容器问题,高手请进
我在我的类(.h文件)中定义了
static map<SOCKET,WSAOVERLAPPEDEX>m_CMDClientMap;
后,不在实现文件中使用这个变量就不会出错,但是只要在
实现文件中使用这个变量就会连接出错。
错误如下:
Linking...
FtpCmdHandle.obj : error LNK2001: unresolved external symbol "private: static class std::map<unsigned int,class CWSAOverlappedEx *,struct std::less<unsigned int>,class std::allocator<class CWSAOverlappedEx *> > CFtpCmdHandle::m_CMDClientMap" (?m_CM
DClientMap@CFtpCmdHandle@@0V?$map@IPAVCWSAOverlappedEx@@U?$less@I@std@@V?$allocator@PAVCWSAOverlappedEx@@@3@@std@@A)
Release/myFTPserver.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
myFTPserver.exe - 2 error(s), 0 warning(s)
为什么?