我的类
class Buttons
{public:
Buttons(BYTE bVk,UINT uChar,UINT uFullChar,UINT uCtrl,DWORD fdwFlags,bool isEnable = true)
         {
              ............
          };
~Buttons() {};
bool IsNormalKey()
{return (!(m_fdwFlags & (F_STK|F_TOG|F_MODE|F_VVK)));};
BYTE m_bVk;
UINT m_uChar;
UINT m_uFullChar;
UINT m_uCtrl;
DWORD m_fdwFlags;
bool m_isEnable;
protected:
private:
};
为什么用
vector<Buttons>的时候(有包含<vector>和using namespace std),会有以下连接错误:im.obj : error LNK2019: unresolved external symbol __CxxThrowException referenced in function "protected: void __cdecl std::vector<class Buttons,class std::allocator<class Buttons> >::_Xran(void)const " (?_Xran@?$vector@VButtons@@V?$allocator@VButto
ns@@@std@@@std@@IBAXXZ)im.obj : error LNK2001: unresolved external symbol "public: __cdecl std::exception::exception(class std::exception const &)" (??0exception@std@@QAA@ABV01@@Z)
im.obj : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)im.obj : error LNK2019: unresolved external symbol "public: __cdecl std::exception::exception(char const *)" (??0exception@std@@QAA@PBD@Z) referenced in function "public: __cdecl std::logic_error::logic_error(class std::basic_string<char,struct std:
:char_traits<char>,class std::allocator<char> > const &)" (??0logic_error@std@@QAA@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z)im.obj : error LNK2019: unresolved external symbol "public: virtual __cdecl std::exception::~exception(void)" (??1exception@std@@UAA@XZ) referenced in function "public: virtual __cdecl std::logic_error::~logic_error(void)" (??1logic_error@std@@UAA@X
Z)im.obj : error LNK2019: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@std@@YAXXZ) referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __cdecl std::basic_strin
g<char,struct std::char_traits<char>,class std::allocator<char> >::assign(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int,unsigned int)" (?assign@?$basic_string@DU?$char_traits@D@std@@V?$a
llocator@D@2@@std@@QAAAAV12@ABV12@II@Z)im.obj : error LNK2019: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@std@@YAXXZ) referenced in function "private: bool __cdecl std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Grow(unsigned in
t,bool)" (?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAA_NI_N@Z)im.obj : error LNK2001: unresolved external symbol __CxxFrameHandler
ARMV4IRel/MRSPhonim.dll : fatal error LNK1120: 8 unresolved externalsError executing link.exe.