gpt4 book ai didi

boost - 2> LINK : fatal error LNK1104: cannot open file 'libboost_filesystem-vc120-mt-sgd-1_58.lib'

转载 作者:行者123 更新时间:2023-12-04 13:38:34 30 4
gpt4 key购买 nike

难怪...\boost_1_58_0\stage\lib中没有这样的文件。我怎么能得到一个?我只有:

boost_1_58_0\stage\lib\libboost_filesystem-vc120-mt-s-1_58.lib
boost_1_58_0\stage\lib\libboost_filesystem-vc120-s-1_58.lib

在那里。试图编译带有各种选项的boost,最后以 --build-type=complete( Linker error LNK1104 with 'libboost_filesystem-vc100-mt-s-1_49.lib'的“穷人”解决方案)结尾,以得到:
> b2 toolset=msvc threadapi=win32 link=static runtime-link=static \
variant=release address-model=32 --with-filesystem --with-locale --with-regex \
--with-system --with-iostreams --build-type=complete

我要导入的项目的自述文件中建议的命令行-仍然没有乐趣。我很费力地为它建立一个MSVS解决方案,这是一个CMake项目。

注意:仔细查看CMake gui时,我的问题已解决:

我意识到这是未构建的Debug配置,并且当我右键单击“解决方案”>“配置管理器”>“更改为发行版”时,已经足够确定。仍然存在问题-我如何获得那些libboost_filesystem-vc120-mt- sgd -1_58.lib构建?

最佳答案

您需要在b2命令行参数中包含runtime-link=static runtime-debugging=on variant=debug才能获取sgd

boost docs关于Windows上的库命名(特别是ABI标签部分):

ABI tag: encodes details that affect the library's interoperability with other compiled code. For each such feature, a single letter is added to the tag:

Key  |  Use this library when:                                |  Boost.Build option
=====================================================================================
s | linking statically to the C++ standard library and | runtime-link=static
| compiler runtime support libraries. |
-------------------------------------------------------------------------------------
g | using debug versions of the standard and runtime | runtime-debugging=on
| support libraries. |
-------------------------------------------------------------------------------------
y | using a special debug build of Python. | python-debugging=on
-------------------------------------------------------------------------------------
d | building a debug version of your code. | variant=debug
-------------------------------------------------------------------------------------
p | using the STLPort standard library rather than the | stdlib=stlport
| default one supplied with your compiler. |

关于boost - 2> LINK : fatal error LNK1104: cannot open file 'libboost_filesystem-vc120-mt-sgd-1_58.lib' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29809014/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com