zoukankan      html  css  js  c++  java
  • libcmt.lib和msvcrt.lib冲突,原因和解决方法

    libcmt.lib和msvcrt.lib冲突,原因和解决方法

    https://blog.csdn.net/longlijun/article/details/7331093

    libcmt.lib是windows环境下vc提供的静态运行时库(多线程);msvcrt.lib是动态运行时库。

    原因

    由于DLL(或EXE)工程设置的Runtime Library 和 它导入的其他(.lib)库的Runtime Library不同。

    比如: 下面为Release版,其中Runtime Library和use of MFC 需要匹配(所以这两个内容的设置是两两对应的)

    类型我的DLL工程需要调用的lib库的工程结果
    工程名 DShow_Graph Baseclasses ——
    use of MFC Use MFC in a static Library Use MFC in a static Library ——
    Runtime Library Multi_threaded(/MT) Multi_threaded(/MT) 不冲突
    use of MFC Use MFC in a static Library Use MFC in a shared DLL ——
    Runtime Library Multi_threaded(/MT) Multi_threaded DLL(/MTd) 冲突
    use of MFC Use MFC in a shared DLL Use MFC in a static Library ——
    Runtime Library Multi_threaded DLL(/MTd) Multi_threaded(/MT) 冲突
    use of MFC Use MFC in a shared DLL Use MFC in a shared DLL ——
    Runtime Library Multi_threaded DLL(/MTd) Multi_threaded DLL(/MTd) 不冲突

    如果是Debug版本,只需要将上面的设置改为debug下的对应设置后,对应起来理解就可以了


    解决方法

    • 把在编译两个工程时,把两个运行库都改为统一的(都是(/MT)或都是(/MTd)),这样就能顺利编译通过了。
  • 相关阅读:
    1. cocos creator 连接服务端
    cocos creator 中的粒子效果
    cocos creator
    5.4 笔记
    事后诸葛亮
    PHP之魔术方法
    结队编程--作业一
    团队作业9——事后分析(Beta版本)
    团队作业8——测试与发布(Beta阶段)
    Beta版本冲刺计划
  • 原文地址:https://www.cnblogs.com/lsgxeva/p/8909451.html
Copyright © 2011-2022 走看看