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

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

        如何在 Visual C++ 中构建导入库 (.lib) 和 DLL?

        How do I build an import library (.lib) AND a DLL in Visual C++?(如何在 Visual C++ 中构建导入库 (.lib) 和 DLL?)
          <tfoot id='gnJcd'></tfoot>
        • <i id='gnJcd'><tr id='gnJcd'><dt id='gnJcd'><q id='gnJcd'><span id='gnJcd'><b id='gnJcd'><form id='gnJcd'><ins id='gnJcd'></ins><ul id='gnJcd'></ul><sub id='gnJcd'></sub></form><legend id='gnJcd'></legend><bdo id='gnJcd'><pre id='gnJcd'><center id='gnJcd'></center></pre></bdo></b><th id='gnJcd'></th></span></q></dt></tr></i><div id='gnJcd'><tfoot id='gnJcd'></tfoot><dl id='gnJcd'><fieldset id='gnJcd'></fieldset></dl></div>
          <legend id='gnJcd'><style id='gnJcd'><dir id='gnJcd'><q id='gnJcd'></q></dir></style></legend>

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

                  <tbody id='gnJcd'></tbody>

                  <bdo id='gnJcd'></bdo><ul id='gnJcd'></ul>
                  本文介绍了如何在 Visual C++ 中构建导入库 (.lib) 和 DLL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想要一个单独的 Visual Studio 项目来构建一个 DLL 文件和一个导入库 (.lib) 文件.(导入库是一个静态链接库,负责在其他使用它的项目中加载该 DLL 文件.

                  I want to have a single Visual Studio project that builds a DLL file and an import library (.lib) file. (An import library is a statically-linked library that takes care of loading that DLL file in other projects that use it).

                  于是我去了Visual Studio C++ 2008 Express Edition,创建了一个类库类型的新项目,并将配置类型"设置为动态库(.dll)".

                  So I went to Visual Studio C++ 2008 Express Edition, created a New Project of type Class Library, and set the "Configuration Type" to be "Dyanamic Library (.dll)".

                  但是当我构建解决方案时,我看到的唯一相关输出文件是一个 DLL 文件;我没有看到生成任何 LIB 文件.我查看了项目目录和所有子目录(Release 和 Debug).

                  But when I build the solution, the only relevant output file I see is a DLL file; I don't see any LIB file getting generated. I looked in the project directory and all subdirectories (Release and Debug).

                  我相信可以同时构建 LIB 和 DLL 文件,因为 在 MSDN 上它说链接器在构建 DLL 时创建导入库." 另外,该网站的另一个用户正在使用 Visual C++ 同时创建 LIB 和 DLL 文件.

                  I believe that it is possible to build a LIB and a DLL file at the same time because on the MSDN it says "The linker creates the import library when the DLL is built." Also, another user of this website is creating LIB and DLL files at the same time using Visual C++.

                  那我该怎么办?

                  推荐答案

                  通过选择类库",您无意中告诉它使用 C++ 的 CLI(托管)扩展来制作 .Net 库.

                  By selecting 'Class Library' you were accidentally telling it to make a .Net Library using the CLI (managed) extenstion of C++.

                  相反,创建一个 Win32 项目,然后在下一页的应用程序设置"中选择DLL".

                  Instead, create a Win32 project, and in the Application Settings on the next page, choose 'DLL'.

                  如果你想走那条路,你也可以从这些库选择中制作 MFC DLL 或 ATL DLL,但听起来你没有.

                  You can also make an MFC DLL or ATL DLL from those library choices if you want to go that route, but it sounds like you don't.

                  这篇关于如何在 Visual C++ 中构建导入库 (.lib) 和 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?)
                • <legend id='tlxSj'><style id='tlxSj'><dir id='tlxSj'><q id='tlxSj'></q></dir></style></legend>

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

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