error LNK2001: unresolved external symbol "public: static ... 解决一法
2011-09-05 15:15
501 查看
error LNK2001: unresolved external symbol "public: static int CSerialPort::m_nWriteSize" (?m_nWriteSize@CSerialPort@@2HA)SerialPort.obj
类中静态变量未初始化或初始化错误。
在类的外面用int CSerialPort::m_nWriteSize =0;初始化就行了。
对于数组形式的,这样赋值:unsigned char CSerialPort::recv_data[32] = "";
类中静态变量未初始化或初始化错误。
在类的外面用int CSerialPort::m_nWriteSize =0;初始化就行了。
对于数组形式的,这样赋值:unsigned char CSerialPort::recv_data[32] = "";
相关文章推荐
- 问题error LNK2001: unresolved external symbol "public: static class解决
- unresolved external symbol "public: static struct 错误的原因及解决方法
- vc中的error LNK2001: unresolved external symbol "public: static错误解决
- error LNK2001: unresolved external symbol "public: virtual __thiscall CppUnit的解决办法
- 错误提示:error LNK2001: unresolved external symbol "public: static int person::weight" (?weight@person@@
- error LNK2001: unresolved external symbol "public: __thiscall Point::~Point(void)" (??1Point@@QAE@XZ
- error LNK2001: unresolved external symbol "int __cdecl"等解决方法
- error LNK2001: unresolved external symbol "public: static XXXXXXXXXX
- 浅析error LNK2001: unresolved external symbol "public: __thisc...
- error LNK2001: unresolved external symbol "public: void __thiscall CDvrRecordOpt::Terminate(void)"
- error LNK2001: unresolved external symbol "protected: 类似问题的解决办法
- error LNK2001: unresolved external symbol \"public: __thiscall。。。
- error LNK2001: unresolved external symbol "__declspec(dllimport) public:
- 浅析error LNK2001: unresolved external symbol "public: __thisc...
- error LNK2001: unresolved external symbol "public: int __thiscall CFtProtocolThread::getFnIds(class _STL::vector > &)" (?getFnId
- 关于 error LNK2001: unresolved external symbol "public: static class CString 错误处理
- 关于"testencodefile.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public"
- 浅析error LNK2001: unresolved external symbol "public: __thiscall
- error LNK2001: unresolved external symbol "public:
- error LNK2001: unresolved external symbol "public: static struct QMetaObject const QwtPlot::staticMe