c++/ boost 库常见错误及解决方法总结

1. error LNK2019: 无法解析的外部符号 "class boost::system::error_category const & __cdecl boost::system::system_category(void)"

解决:X86与X64库不匹配引起的,需要编译一个对应版本的库。即boost库的版本和VS的平台需要一致。
 
 
 
 
 
 
 

1. 不定义该运算符或到预定义运算符可接收的类型的转换

因为std::set 是需要排序的,因此需要把std::<struct> 中定义的struct、class重载operator < 方法。std::map<key, value> 中的key也需要如此。

原文地址:https://www.cnblogs.com/tyche116/p/9358613.html