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

    • <bdo id='5rrp1'></bdo><ul id='5rrp1'></ul>

    <tfoot id='5rrp1'></tfoot>
    1. <legend id='5rrp1'><style id='5rrp1'><dir id='5rrp1'><q id='5rrp1'></q></dir></style></legend>

      <small id='5rrp1'></small><noframes id='5rrp1'>

        链接:致命错误 LNK 1104:无法打开文件“LIBCMT.lib"

        LINK: fatal error LNK 1104: cannot open file #39;LIBCMT.lib#39;(链接:致命错误 LNK 1104:无法打开文件“LIBCMT.lib)

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

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

          1. <tfoot id='YPAxf'></tfoot>
                    <tbody id='YPAxf'></tbody>

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

                  本文介绍了链接:致命错误 LNK 1104:无法打开文件“LIBCMT.lib"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  请帮忙,我花了一整天的时间来编译我的 C++ 应用程序.

                  Please help, I have spent all day trying to make my c++ app compile.

                  我的项目包含一个源文件:Foo.cpp.这是它的代码:

                  My project contains one source file: Foo.cpp. Here is its code:

                  #include <jni.h>
                  #include <com_Foo.h>
                  
                  JNIEXPORT jint JNICALL Java_com_Foo_add
                  (JNIEnv * env, jobject obj, jint x, jint y)
                  {
                      return x+y;
                  }
                  

                  如您所见,我试图使用 JNI,但我认为这与问题无关.这是我在命令行上尝试的:

                  as you can see I was trying to use JNI, but I don't think that has anything to do with the problem. Here is what I tried on the command line:

                  C:Usersmichaelcworkspacefoo>cl -LD Foo.cpp -FeFoo.dll
                  Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
                  Copyright (C) Microsoft Corporation.  All rights reserved.
                  
                  Foo.cpp
                  Microsoft (R) Incremental Linker Version 10.00.30319.01
                  Copyright (C) Microsoft Corporation.  All rights reserved.
                  
                  /dll
                  /implib:Foo.lib
                  /out:Foo.dll
                  Foo.obj
                  LINK : fatal error LNK1104: cannot open file 'LIBCMT.lib'
                  

                  在我的环境中,我设置了:

                  In my environment I have set:

                  包括:C:_include;C:frankensteinincludes;C:Program FilesJavajdk1.6.0_24include;C:Program FilesJavajdk1.6.0_24includewin32;C:_includewin32;C:Program Files (x86)Microsoft Visual Studio 10.0VCinclude

                  INCLUDE: C:_include;C:frankensteinincludes;C:Program FilesJavajdk1.6.0_24include;C:Program FilesJavajdk1.6.0_24includewin32;C:_includewin32;C:Program Files (x86)Microsoft Visual Studio 10.0VCinclude

                  库路径:C:Program Files (x86)Microsoft Visual Studio 10.0VClib

                  LIBPATH: C:Program Files (x86)Microsoft Visual Studio 10.0VClib

                  我检查了 lib 目录,它包含一个libcmt.lib"文件.不知道是否区分大小写,但我知道我从未更改过 Visual Studio 文件或目录中的任何内容.

                  I checked in the lib directory, it contains a "libcmt.lib" file. Don't know if it is case sensitive, but I know that I never changed anything in the visual studio files or directories.

                  有人能告诉我如何使这项工作成功吗?

                  Would somebody please tell me how I can make this work?

                  推荐答案

                  在 2018 年底重新启动此线程,因为其他解决方案都没有帮助我的情况 :)

                  Resurrecting this thread in late 2018 since none of the other solutions helped my case :)

                  对我来说,在我为一个完全不相关的项目安装 Windows Driver Kit 后,这个错误开始突然出现.

                  For me this error started appearing out of nowhere after i installed Windows Driver Kit for a completely unrelated project.

                  如果您不需要Spectre Mitigation"(您很可能不需要)并且看到此错误,则很有可能您只需要设置项目属性(属性页)-> 配置属性 -> C/C++ -> 代码生成 -> 幽灵缓解禁用.

                  If you don't need "Spectre Mitigation" (you most likely do not) and seeing this error it's highly probable that you just have to set Project Properties (property pages) -> Configuration Properties -> C/C++ -> Code Generation -> Spectre Mitigation to Disabled.

                  神奇的是,它被所有项目中用于 WDK 的 Visual Studio 工具的安装程序设置为启用,即使它们与 WDK 无关,也没有为任何驱动程序相关的内容选择平台工具集.微软处于最佳状态.

                  Magically it was set to Enabled by the installer of Visual Studio tools for WDK in all projects even tho they got nothing to do with WDK nor the Platform toolset was selected for any driver related stuff. Microsoft at its finest.

                  这篇关于链接:致命错误 LNK 1104:无法打开文件“LIBCMT.lib"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Is Type(::x); valid?(是类型(::x);有效的?)
                  Difference between an inline function and static inline function(内联函数和静态内联函数的区别)
                  Compilation fails randomly: quot;cannot open program databasequot;(编译随机失败:“无法打开程序数据库)
                  Too many initializers error for a simple array in bcc32(bcc32 中的简单数组的初始值设定项过多错误)
                  No Member named stoi in namespace std(命名空间 std 中没有名为 stoi 的成员)
                  Error using a constexpr as a template parameter within the same class(在同一个类中使用 constexpr 作为模板参数时出错)

                    <legend id='6HAFG'><style id='6HAFG'><dir id='6HAFG'><q id='6HAFG'></q></dir></style></legend>

                      <small id='6HAFG'></small><noframes id='6HAFG'>

                        <tbody id='6HAFG'></tbody>

                        <bdo id='6HAFG'></bdo><ul id='6HAFG'></ul>
                        <tfoot id='6HAFG'></tfoot>

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