• <bdo id='T0DYs'></bdo><ul id='T0DYs'></ul>

    <tfoot id='T0DYs'></tfoot>

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

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

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

      1. 在 VS 中编译 C++,而无需在运行时使用 MSVCP120D.dll

        Compile C++ in VS without requiring MSVCP120D.dll at runtime(在 VS 中编译 C++,而无需在运行时使用 MSVCP120D.dll)
        • <legend id='mjCBC'><style id='mjCBC'><dir id='mjCBC'><q id='mjCBC'></q></dir></style></legend>
            <bdo id='mjCBC'></bdo><ul id='mjCBC'></ul>

            <tfoot id='mjCBC'></tfoot>

              <tbody id='mjCBC'></tbody>

              1. <small id='mjCBC'></small><noframes id='mjCBC'>

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

                  本文介绍了在 VS 中编译 C++,而无需在运行时使用 MSVCP120D.dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试制作一个二进制文件,它可以在没有安装 Visual C++ 东西的情况下在任何 Windows 机器上运行(我假设这就是 MSVCP120D.dll 的内容,但是我的搜索对于这实际上是什么并不是很有成效).我为一项任务制作了一个游戏,并希望让其他人(没有安装 VS 的非开发人员)帮助我测试它,但他们不断收到错误消息,说缺少上述 dll.我没有使用任何 Visual C++ 的东西,并且设置了/Za 标志以确保它只是 ANSI C++.Visual Studio 是否支持编译 ANSI C++,如果支持,我该如何让它不使用 Visual C++ 的东西,如果它不支持这个,我应该使用什么编译器?

                  I'm trying to make a binary that can be run on any windows machine without the visual c++ stuff installed (I'm assuming that's what MSVCP120D.dll is however my searching was not very fruitful as to what this actually is). I made a game for an assignment and wanted to have other people (non-devs without VS stuff installed), help me test it but they kept getting errors saying that the above dll is missing. I'm not using any Visual C++ stuff and have the /Za flag set to ensure that it's just ANSI C++. Does Visual Studio support compiling ANSI C++ and if so how do I go about making it not use Visual C++ stuff, if it doesn't support this what compiler should I use?

                  推荐答案

                  如您所见 此处,MSVCP DLL 是 C++ 标准库的平台实现.简而言之,这意味着您不能在不需要这些库提供的东西"的情况下分发您的应用程序.无论平台如何,所有编译器都需要某种标准库的实现.通常以库的形式分发.

                  As you can see here, the MSVCP DLL is the platform's implementation of the C++ Standard Library. In short what that means is you cannot distribute your application without needing the "stuff" that these libraries provide. All compilers regardless of platform would need some kind of implementation of the Standard Library. Typically this is distributed in the form of libraries.

                  但是,您可以分发您的应用程序,以便将东西"直接内置到您的程序中,而不是在单独的 DLL 中提供.为此,您必须将应用程序静态链接到标准库.

                  However you can distribute your application so that the "stuff" is built in to your program directly, rather than being shipped in a separate DLL. In order to do this, you must statically link your application to the Standard Library.

                  有几种方法可以实现这一点.一种方法是在项目设置中.在项目">配置属性">C/C++ 代码生成">运行时库"中,选择多线程(/MT)"而不是多线程(静态)".

                  There are a few ways to accomplish this. One way is in Project Settings. In "Project" > "Configuration Properties" > "C/C++ Code Generation" > "Runtime Library", choose "Multithreaded (/MT)" as opposed to "Mutithreaded (Static)".

                  顺便说一下,你上面提到的MSVCP120D.dll"中的D"是指调试".这意味着您正在尝试分发程序的 调试 版本.你应该(几乎)永远不要这样做.而是分发发布版本.

                  By the way, the "D" in "MSVCP120D.dll" you mentioned above means "Debug." This means that you are trying to distribute a debug build of your program. You should (almost) never do this. Distribute release builds instead.

                  这篇关于在 VS 中编译 C++,而无需在运行时使用 MSVCP120D.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  What is inside .lib file of Static library, Statically linked dynamic library and dynamically linked dynamic library?(静态库、静态链接动态库和动态链接动态库的 .lib 文件里面是什么?)
                  How do I load a C DLL from the SXS in Python?(如何从 Python 中的 SXS 加载 C DLL?)
                  Can Cython code be compiled to a dll so C++ application can call it?(Cython 代码可以编译成 dll 以便 C++ 应用程序可以调用它吗?)
                  Delay Loading DLLs(延迟加载 DLL)
                  Throwing C++ exceptions across DLL boundaries(跨 DLL 边界抛出 C++ 异常)
                  Loading a dll from a dll?(从 dll 加载 dll?)
                    <tbody id='jlGlI'></tbody>

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

                          <tfoot id='jlGlI'></tfoot>

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

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