<legend id='aBeDU'><style id='aBeDU'><dir id='aBeDU'><q id='aBeDU'></q></dir></style></legend>

    <small id='aBeDU'></small><noframes id='aBeDU'>

      <bdo id='aBeDU'></bdo><ul id='aBeDU'></ul>

    <i id='aBeDU'><tr id='aBeDU'><dt id='aBeDU'><q id='aBeDU'><span id='aBeDU'><b id='aBeDU'><form id='aBeDU'><ins id='aBeDU'></ins><ul id='aBeDU'></ul><sub id='aBeDU'></sub></form><legend id='aBeDU'></legend><bdo id='aBeDU'><pre id='aBeDU'><center id='aBeDU'></center></pre></bdo></b><th id='aBeDU'></th></span></q></dt></tr></i><div id='aBeDU'><tfoot id='aBeDU'></tfoot><dl id='aBeDU'><fieldset id='aBeDU'></fieldset></dl></div>

      <tfoot id='aBeDU'></tfoot>

    1. 我有静态或动态 boost 库吗?

      时间:2023-07-19

      <small id='LhAZu'></small><noframes id='LhAZu'>

      <legend id='LhAZu'><style id='LhAZu'><dir id='LhAZu'><q id='LhAZu'></q></dir></style></legend>

              <i id='LhAZu'><tr id='LhAZu'><dt id='LhAZu'><q id='LhAZu'><span id='LhAZu'><b id='LhAZu'><form id='LhAZu'><ins id='LhAZu'></ins><ul id='LhAZu'></ul><sub id='LhAZu'></sub></form><legend id='LhAZu'></legend><bdo id='LhAZu'><pre id='LhAZu'><center id='LhAZu'></center></pre></bdo></b><th id='LhAZu'></th></span></q></dt></tr></i><div id='LhAZu'><tfoot id='LhAZu'></tfoot><dl id='LhAZu'><fieldset id='LhAZu'></fieldset></dl></div>
                <tbody id='LhAZu'></tbody>

              <tfoot id='LhAZu'></tfoot>
              • <bdo id='LhAZu'></bdo><ul id='LhAZu'></ul>
              • 本文介绍了我有静态或动态 boost 库吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我已经运行了 bjam.exe --build-dir="C:uild-boost" --build-type=minimal msvc stage

                现在我有带有这些头文件的库 .lib,例如

                and now I have libraries .lib with these headers, for example

                libboost_serialization-vc100-mt
                libboost_serialization-vc100-mt-1_45
                libboost_serialization-vc100-mt-gd
                libboost_serialization-vc100-mt-gd-1_45
                

                我相信这些应该是用于调试和发布版本的静态库.当我使用 Multi-threaded Debug (/MTd) 运行编译器时,它给出错误 LNK1104: cannot open file 'libboost_serialization-vc100-mt-sgd-1_45.lib'它正在寻找一个 -sgd

                I believe these should be static libraries for debug and release version. When I run the compiler with Multi-threaded Debug (/MTd) it gives an error LNK1104: cannot open file 'libboost_serialization-vc100-mt-sgd-1_45.lib' It is looking for one with -sgd

                我哪里出错了?

                推荐答案

                有点令人困惑的是,使用 MSVC 构建 boost 有两个静态"选项.

                Something that is kind of confusing is there are two 'static' options for building boost with MSVC.

                B2.exe 采用选项 link=static,它告诉 boost 您想要静态链接 IT.如果您使用/MT 或/MTd 编译您的 VC 项目,您还需要使用 runtime-link=static 选项来告诉 boost 您将静态链接到 VC 运行时库.

                B2.exe takes the option link=static which tells boost that you want to link IT statically. If you are compiling your VC project with /MT or /MTd you will also need to use the runtime-link=static option to tell boost that you will be linking to the VC runtime libraries statically.

                第二个 runtime-link=static 将 -s 放在 .lib 名称中.

                It is the second runtime-link=static which puts the -s in the .lib name.

                我用于构建 boost 的命令行是

                My command line for building boost was

                b2.exe --toolset=msvc variant=release link=static threading=multi runtime-link=static stage
                

                这篇关于我有静态或动态 boost 库吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:使用 Boost 解析 XML 属性 下一篇:Boost.Log 与 CMake 导致未定义的参考错误

                相关文章

                1. <tfoot id='kbvlg'></tfoot>

                  <i id='kbvlg'><tr id='kbvlg'><dt id='kbvlg'><q id='kbvlg'><span id='kbvlg'><b id='kbvlg'><form id='kbvlg'><ins id='kbvlg'></ins><ul id='kbvlg'></ul><sub id='kbvlg'></sub></form><legend id='kbvlg'></legend><bdo id='kbvlg'><pre id='kbvlg'><center id='kbvlg'></center></pre></bdo></b><th id='kbvlg'></th></span></q></dt></tr></i><div id='kbvlg'><tfoot id='kbvlg'></tfoot><dl id='kbvlg'><fieldset id='kbvlg'></fieldset></dl></div>

                  <small id='kbvlg'></small><noframes id='kbvlg'>

                  1. <legend id='kbvlg'><style id='kbvlg'><dir id='kbvlg'><q id='kbvlg'></q></dir></style></legend>
                    • <bdo id='kbvlg'></bdo><ul id='kbvlg'></ul>