【问题标题】:VS2019 + Clang could not open 'libboost_date_time-clangw10-mt-gd-x32-1_73.lib': no such file or directoryVS2019 + Clang 无法打开'libboost_date_time-clangw10-mt-gd-x32-1_73.lib':没有这样的文件或目录
【发布时间】:2020-10-06 09:32:26
【问题描述】:

我有一个 VS2019 项目,使用 Boost 1_73_0 和 Clang。我收到有关缺少 boost 库的链接器错误:

1>lld-link : error : could not open 'libboost_date_time-clangw10-mt-gd-x32-1_73.lib': no such file or directory

当我“安装”boost 时,我只是将文件解压缩到特定位置。

我看到这个问题提到设置链接器路径:

https://stackoverflow.com/a/13042696/997112

但是我的 Boost 目录没有<boost_path>\stage\lib 路径,它只有<boost_path\libs

(我确实为此设置了链接器附加依赖项,但它不起作用)

我的系统上似乎不存在此文件。我应该编译 Boost 源来使用这个库吗?

更新:为什么需要这个库?我使用的唯一 Boost 库是 Interprocess。

【问题讨论】:

    标签: visual-studio boost clang visual-studio-2019


    【解决方案1】:

    您需要为clang 构建boost 库二进制文件,这些二进制文件通常安装在<boost_path>\stage\lib 路径中。请参阅答案here,了解如何在 Windows 上使用clang 构建boost

    您需要构建boost 库的原因是因为您的程序中的某些内容引用了boost date-time 库。

    【讨论】:

    • 谢谢。令人费解的是,我只使用了Boost Interprocess,没有其他的boost。
    • 在这种情况下,Boost Interprocess 必须使用 boost date-time 中的某些内容。
    猜你喜欢
    • 1970-01-01
    • 2019-01-14
    • 1970-01-01
    • 1970-01-01
    • 2014-06-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多