邮箱里有一个 stackoverflow 的邮件, 原来有人回复我:

kudos...
外, 吐槽这个问题: c++ - Building Boost BCP - Stack Overflow, 人家问的是为啥有这个 link 错误, 一个个都按照文档回答怎么编译 bcp...
link 错误是因为在 windows 上 有一个头文件 (boost/config/auto_link.hpp) 直接用 pragma 的方式 link 编译好的 lib 二进制. 没有配置好环境变量就跪了.
看我最后一句:
Tip: If you come across linking problems on Windows when using Boost, go check the
boost/config/auto_link.hpp
and you'll understand. To resolve this, you can just comment out the whole file.
网友评论