先上下vs2010报错代码
1> 正在创建库 D:\Qtproject\src\Server\Debug\Server.lib 和对象 D:\Qtproject\src\Server\Debug\Server.exp
1>net_comm.obj : error LNK2019: 无法解析的外部符号 "public: void __thiscall tcp_session::write(class tcp_message *)" (?write@tcp_session@@QAEXPAVtcp_message@@@Z),该符号在函数 "private: bool __thiscall net_comm::send_msg(class tcp_message * &)" (?send_msg@net_comm@@AAE_NAAPAVtcp_message@@@Z) 中被引用
1>net_comm.obj : error LNK2019: 无法解析的外部符号 "public: void __thiscall tcp_session::close(void)" (?close@tcp_session@@QAEXXZ),该符号在函数 "protected: bool __thiscall net_comm::send_packet(class boost::shared_ptr &,class serial_packet &)" (?send_packet@net_comm@@IAE_NAAV?$shared_ptr@Vtcp_session@@@boost@@AAVserial_packet@@@Z) 中被引用
1>net_comm.obj : error LNK2019: 无法解析的外部符号 "public: bool __thiscall tcp_session::isconnected(void)" (?isconnected@tcp_session@@QAE_NXZ),该符号在函数 "protected: bool __thiscall net_comm::send_packet(class boost::shared_ptr &,class serial_packet &)" (?send_packet@net_comm@@IAE_NAAV?$shared_ptr@Vtcp_session@@@boost@@AAVserial_packet@@@Z) 中被引用
1>net_comm.obj : error LNK2019: 无法解析的外部符号 "public: class boost::asio::basic_stream_socket > & __thiscall tcp_session::socket(void)" (?socket@tcp_session@@QAEAAV?$basic_stream_socket@Vtcp@ip@asio@boost@@V?$stream_socket_service@Vtcp@ip@asio@boost@@@34@@asio@boost@@XZ),该符号在函数 "protected: bool __thiscall net_comm::send_packet(class boost::shared_ptr &,class serial_packet &)" (?send_packet@net_comm@@IAE_NAAV?$shared_ptr@Vtcp_session@@@boost@@AAVserial_packet@@@Z) 中被引用
1>ServerNetwork.obj : error LNK2019: 无法解析的外部符号 "public: __thiscall tcp_server::tcp_server(unsigned short,class net_comm *,int)" (??0tcp_server@@QAE@GPAVnet_comm@@H@Z),该符号在函数 "class boost::shared_ptr __cdecl boost::make_shared(int &,class ServerNetwork * const &&,int &)" (??$make_shared@Vtcp_server@@AAHQAVServerNetwork@@AAH@boost@@YA?AV?$shared_ptr@Vtcp_server@@@0@AAH$$QBQAVServerNetwork@@0@Z) 中被引用
1>D:\Qtproject\src\Server\Debug\Server.exe : fatal error LNK1120: 5 个无法解析的外部命令
========== 全部重新生成: 成功 0 个,失败 1 个,跳过 0 个 ==========
这个错误write() close() isconnected() 我函数里都是有明确定义 为什么还是报这个错 生成的时候报的错?