问题回溯

今天拿到别人已经编译好的库,发现在链接的时候出现了报错

[9/9 12.7/sec] Linking CXX shared module bin\plugins\AsensingPlugin\AsensingPlugin.dll
FAILED: bin/plugins/AsensingPlugin/AsensingPlugin.dll
cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_dll --intdir=Plugins\AsensingPlugin\Plugin\CMakeFiles\AsensingPlugin.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100177~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100177~1.0\x64\mt.exe --manifests -- C:\PROGRA~2\MICROS~2\2017\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\AsensingPlugin.rsp /out:bin\plugins\AsensingPlugin\AsensingPlugin.dll /implib:lib\plugins\AsensingPlugin\AsensingPlugin.lib /pdb:bin\plugins\AsensingPlugin\AsensingPlugin.pdb /dll /version:0.0 /machine:x64 /INCREMENTAL:NO /INCREMENTAL:NO /LTCG && cd ."
LINK: command "C:\PROGRA~2\MICROS~2\2017\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\AsensingPlugin.rsp /out:bin\plugins\AsensingPlugin\AsensingPlugin.dll /implib:lib\plugins\AsensingPlugin\AsensingPlugin.lib /pdb:bin\plugins\AsensingPlugin\AsensingPlugin.pdb /dll /version:0.0 /machine:x64 /INCREMENTAL:NO /INCREMENTAL:NO /LTCG /MANIFEST /MANIFESTFILE:bin\plugins\AsensingPlugin\AsensingPlugin.dll.manifest" failed (exit code 1120) with the following output:
ag1.lib(filter.cpp.obj) : error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项: 值“2”不匹配值“0”(AsensingPluginPlugin.cxx.obj 中)
ag1.lib(filter.cpp.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MDd_DynamicDebug”不匹配值“MD_DynamicRelease”(AsensingPluginPlugin.cxx.obj 中)
正在创建库 lib\plugins\AsensingPlugin\AsensingPlugin.lib 和对象 lib\plugins\AsensingPlugin\AsensingPlugin.exp
MSVCRT.lib(initializers.obj) : warning LNK4098: 默认库“msvcrtd.lib”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
ag1.lib(filter.cpp.obj) : error LNK2001: 无法解析的外部符号 __imp__invalid_parameter
ag1.lib(filter.cpp.obj) : error LNK2001: 无法解析的外部符号 __imp__CrtDbgReport
bin\plugins\AsensingPlugin\AsensingPlugin.dll : fatal error LNK1120: 2 个无法解析的外部命令
ninja: build stopped: subcommand failed.
15:07:29: 进程"C:\Program Files\CMake\bin\cmake.exe"退出,退出代码 1 。

划重点

ag1.lib(filter.cpp.obj) : error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项: 值“2”不匹配值“0”(AsensingPluginPlugin.cxx.obj 中)
ag1.lib(filter.cpp.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MDd_DynamicDebug”不匹配值“MD_DynamicRelease”(AsensingPluginPlugin.cxx.obj 中)

问题分析

库与库之间的变量不匹配:_ITERATOR_DEBUG_LEVEL和RuntimeLibrary,这个大概率是采用了不同的build版本编译所致,重新编译版本一致的库就得了

参考

_ITERATOR_DEBUG_LEVEL | Microsoft Learn

Windows库链接报错的更多相关文章

  1. VS Code远程链接报错Could not establish connection to “hz.matpool.com”

    VS Code远程链接报错Could not establish connection to "hz-t2.matpool.com" 输出的部分内容 安装Git git for w ...

  2. vc++2013中使用MySQL connector/C++ 1.1.4静态链接报错

    包含头文件 #include <mysql_connection.h> #include <mysql_driver.h> #include <cppconn/state ...

  3. MySql8.0数据库链接报错The driver has not received any packets from the server

    1.我使用MySql数据库8.0版本,然后驱动改成了 jdbc.driver=com.mysql.cj.jdbc.Driver jdbc.url=jdbc:mysql://127.0.0.1:3306 ...

  4. 【Mac + GitHub】之在另一台Mac电脑上下载GitHub的SSH链接报错

    当输入git命令github项目时报错: ⇒ git clone git@github.com:/TX-Class.git Cloning into 'TX-Class'... Warning: Pe ...

  5. vbox在共享文件夹设置链接报错Protocol error问题

    环境: 基于VBox 的 vagrant (centos版本)开发环境. 问题: Virtualbox 虚拟机(centOS)中,在进行go程序编译的时候,需要设置一个链接符,然后得到了如下的错误: ...

  6. oracle链接报错shared memory realm does not exist

    问题描述: 前两天能够正常链接,今天来了突然不能链接,原因不详. 处理方法: 连接linux进行如下操作: 1.sqlplus /nolog 2.conn / as sysdba 3.startup ...

  7. MySql-8.0.x免安装版下载与配置,Navicat打开数据库链接报错1251的解决办法

    若你以前卸载过mysql,小白极大可能没有卸载和删除干净残留,没有卸载干净就肯定重装不成功,可参考https://www.cnblogs.com/Luoters/p/11869032.html 参考与 ...

  8. windows 远程连接报错

    在windows7上或者windows10上远程连接服务器报错("连接错误"),试了网上的方法,发现是服务器安装ssl证书关闭了ssh服务,开启ssh服务后,重启电脑就可以解决这个 ...

  9. selenium ide 录制回放link链接报错

    回放是出现以下错误: 也就是回放点击打开新的链接时出现这个错误, 这个问题说的是 点击此链接会新打开一个窗口 selenium1是不支持多窗口切换的 因此会卡在这里,也就录制不支持这个操作,但是很多书 ...

  10. mongo链接报错:couldn't connect to server 127.0.0.1:27017 (127.0.0.1)

    angela@angeladeMacBook-Air:/data/db$mongo MongoDB shell version: 2.6.1 connecting to: test 2014-06-0 ...

随机推荐

  1. Flask、Tornado、Nginx搭建Https服务

    其实Flask可以直接用tornado部署就行: # coding=utf-8 from tornado.wsgi import WSGIContainer from tornado.httpserv ...

  2. Llama3-8B到底能不能打?实测对比

    前几天Meta开源发布了新的Llama大语言模型:Llama-3系列,本次一共发布了两个版本:Llama-3-8B和Llama-3-70B,根据Meta发布的测评报告,Llama-3-8B的性能吊打之 ...

  3. What is an HL7 ADT Message?

    Patient Admission Discharge and Transfer (ADT) messages are used to exchange the patient state withi ...

  4. 作业帮基于 DeltaLake 的数据湖建设最佳实践

    ​简介:作业帮是一家以科技为载体的在线教育公司,其大数据中台作为基础系统中台,主要负责建设公司级数仓,向各个产品线提供面向业务主题的数据信息.本文主要分享了作业帮基于 DeltaLake 的数据湖建设 ...

  5. 一文详解 | 开放搜索兼容Elasticsearch做召回引擎

    ​简介:开放搜索发布开源兼容版,支持阿里云Elasticsearch做搜索召回引擎,本文详细介绍阿里云ES用户如何通过接入开放搜索兼容版丰富行业分词库,提升查询语义理解能力,无需开发.算法投入,即可获 ...

  6. [FAQ] 如何从 svg 字符串创建 SVGElement

      HTML 部分: <div style="display: none" id="svgCon"></div> JS 部分: cons ...

  7. 4.k8s-配置网络策略 NetworkPolicy

    一.基本了解 官方文档:https://kubernetes.io/zh-cn/docs/concepts/services-networking/network-policies/基本了解: 1.网 ...

  8. 利用引用传递一次遍历构造菜单树(附java&go demo)

    目录 原理讲解 java demo Go demo 优点 原理讲解 利用引用传递,当儿子的儿子变动的时候,自己的儿子的儿子也变动(取地址) java demo package com.huiyuan. ...

  9. C语言笔记001-用C语言编写程序

    例2-1  在屏幕上显示一个短句"Hello World!". #include <stdio.h> int main(void) { printf("hel ...

  10. 生成带重复的笛卡尔乘积过程 Cartesian Product with Repetition

    目录 What is Cartesian Product with Repetition Code Demo What is Cartesian Product with Repetition 比如说 ...