当前位置:网站首页>严重性 代码 说明 项目 文件 行 禁止显示状态 错误 C1047 对象或库文件“.lib”是使用与其他对象(如“x64\Release\main.obj”)不同的
严重性 代码 说明 项目 文件 行 禁止显示状态 错误 C1047 对象或库文件“.lib”是使用与其他对象(如“x64\Release\main.obj”)不同的
2022-06-28 19:28:00 【妙为】
系列文章目录
前言
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 C1047 对象或库文件“.\lib\SceneTempCal.lib”是使用与其他对象(如“x64\Release\main.obj”)不同的编译器版本创建的;请使用相同的编译器重新生成所有对象和库 SceneTest E:\osg\work\ThermalCharacteristics_20220628\SceneTest\LINK 1 
一、错误原因
VS2019 开发,之前一直用的debug模式,代码编译正常
最近改为Release模式,一编译就出现这个错误:
LINK : fatal error C1047: 对象或库文件“.lib”是使用与其他对象(如“x64\Release\main.obj”)不同的编译器版本创建的;请使用相同的编译器重新生成所有对象和库
网上搜了一下,说是:
“我这几天也遇到了这个问题,用别人提供的lib,在vs2019下 debug模式可以运行,但release模式下就不行,出现了和你一样的错误。开始我还以为是lib不兼容,最后发现这个lib在LTCG下不能被解析,做如下改正即可:
Release模式下->配置属性->高级->全程序优化->使用链接时间代码生成 将这里的默认项 “使用链接时间代码生成”改为“无全程序优化”。 接下来就可以运行了。

一般低版本生成的lib都是可以被高版本编译器所用的,这个是兼容性的基础,呵呵!”
于是 改属性吧,改为 无全程序优化后,会报个另一个错,心想不能这么一直搞下去啊,肯定是哪不去了。
后来升级一下VS2019吧,
升级后重编译 也提示这个错,
但是这一次 属性里去掉无全程序优化后 再编译就通过了。
搞不懂,一个lib库 编译起来怎么还有这种情况?
记录一下,
参考
边栏推荐
- Redis 如何实现库存扣减操作?如何防止商品被超卖?
- G 双轴图sql脚本
- Paper notes: universal value function approvers
- Jenkins Pipeline 对Job参数的处理
- 1002_20181019
- Bayesian inference problem, MCMC and variational inference
- 视频压缩处理之ffmpeg用法
- Autumn recruitment experience sharing | how to prepare for bank interview
- Chunfeng power and Huawei work together to build a smart Park benchmark, and the future factory innovation will reach a new level
- C语言-函数知识点
猜你喜欢

《数字经济全景白皮书》消费金融数字化篇 重磅发布
![return new int[]{i + 1, mid + 1};return {i + 1, mid + 1};](/img/6a/45a4494276deba72ef9833818229f5.png)
return new int[]{i + 1, mid + 1};return {i + 1, mid + 1};

Ffmpeg usage in video compression processing

Bayesian inference problem, MCMC and variational inference

How many objects are created after new string ("hello")?

机器学习笔记 temperature+Softmax

Month on month SQL implementation

grafana绘制走势图

Paper 3 vscode & texlive & sumatrapdf create a perfect tool for writing papers

小白创业做电商,选对商城系统很重要!
随机推荐
Machine learning notes temperature+softmax
数据基础设施升级窗口下,AI 新引擎的技术方法论
Building tin with point cloud
2280.Cupboards
团体程序设计天梯赛练习题-持续更新中
Get the timestamp of 0:00 and 23:59 of the current date
The first meta universe concept novel, meta universe 2086, won the upper attack meta universe award in 2022
pd. Difference between before and after cut interval parameter setting
G biaxial graph SQL script
Bayesian inference problem, MCMC and variational inference
Grafana biaxial graph with your hands
Rigid error: could not extract PIDs from PS output PIDS: [], Procs: [“bad pid
Live app system source code, automatically playing when encountering video dynamically
让企业数字化砸锅和IT主管背锅的软件供应链安全风险指南
math_ Proving common equivalent infinitesimal & Case & substitution
我是刚购买的adb mysql服务,我每做一个操作,比如建表,都会弹出这个问题,请问这是什么问题?
Bayesian Reference problem, mCMC and variational reference
Nanopc-t4 (rk3399) Game1 OLED (I2C) display time weather temperature
Figure introduction to neural networks (GNN, GCN)
数论 --- 欧拉函数、筛法求欧拉函数、欧拉定理、费马小定理详细证明