Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我没有安装 Visual Studio 2008。我使用的是 2012,我通过清理来重建这个项目。我检查了项目设置并控制了其他库,不幸的是我找不到任何具有此名称的 lib 链接......在项目中只有 .h 文件使用 date_time 但没有 lib 链接。我配置了新版本的 boost 但它仍然想要这个 lib 吗?那么有什么办法可以解决这个问题吗?
使用 Visual Studio,boost 使用自动链接系统。
Boost 头文件中的特殊代码检测您的编译器选项并使用该信息将正确库的名称编码到您的目标文件中;链接器从您告诉它搜索的目录中选择具有该名称的库。
date_time是需要库的 boost 模块之一(不仅仅是头文件)。
date_time
因此,您必须使用 bjam 构建它们(和--toolset=msvc-9.0),或检索已经为您的系统构建的它们。
--toolset=msvc-9.0)
其他选项:禁用自动链接。只需定义
BOOST_DATE_TIME_NO_LIB
并手动链接。