怎样处理“error C2220: warning treated as error - no object file generated”错误

最近用VS2010 编译ceflib开源库是出现"怎样处理“error C2220: warning treated as error - no object file generated”错误"

产生原因为:有些Project编译选项中,Treat Warnings As Errors(把警告看作错误来处理)选项开启了。

只要把此选项关闭,就可以正常编译了。

在Solution中,选择libMXF工程,右键菜单中选择“Properties”。弹出的属性框中,将Configuration选择“All Configurations”,选择“C/C++/General/”,右侧Treat Warnings As Errors值从原来的“Yes(/WX)”改为“No(/WX-)”。

点击确定,再重新编译,即可。

时间: 2024-12-21 11:30:16

怎样处理“error C2220: warning treated as error - no object file generated”错误的相关文章

error C2220: warning treated as error - no 'object' file generated 处理方法

1>e:\work\xxx\xxx\driver\thread.c(228) : error C2220: warning treated as error - no 'object' file generated 当在C语言中遇到error c2220错误的时候,通常有可能的问题所在是 1. 声明的变量没有放在函数前面,因为在c++中是不规定一定要放在函数头的,但是c规定了 2.声明的变量声明了但是没有使用,从而报这个错,解决的办法是填上去UNREFERENCED_PARAMETER(xxxx

完美解决 error C2220: warning treated as error - no ‘object’ file generated

主要是编译器的选项中,将warning视作error,所以就报错了,可以通过修改编译选项来设置,但是这里不这样做,通过#pragma来控制 如上图,warning号是C4189,真正的号码是4189,所以加上如下语句即可 #pragma warning(disable:4189) 如果有多个警告,则在括号内加空格,如下: #pragma warning(disable:4189 1120)

PMD-Java 代码检查工具对 error 和 warning 的配置

PMD是一款优秀的Java程序代码检查工具.该它可以检查Java代码中是否含有未使用的变量.是否含有空的抓取块.是否含有不必要的对象等. 但在使用过程中,你会项目中发现存在大量的 PMD 插件报出的 error 和 warning,尽管 PMD 鼓励程序员去改进它们并写出干净的代码,但也产生了很多让人烦躁的感觉.更重要的是,你可能忽略了 Java 代码中真正的错误和问题.下面我们就通过在 Eclipse 中配置只有在选中的资源中才去对代码检查. 第一步,在 Eclipse 中选择Problems

jdk1.7升级到jdk1.8后出错: [ERROR] javadoc: warning - Multiple sources of package comments found for package

from: http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html [ERROR] javadoc: warning - Multiple sources of package comments found for package Turning off doclint in JDK 8 Javadoc JDK 8 includes many updates, but one is I suspect goin

[WARNING: ASM communication error: op 0 state 0x0

alter日志报错: Wed Apr 09 14:17:35 2014 WARNING: ASM communication error: op 0 state 0x0 (15055) ERROR: direct connection failure with ASM Wed Apr 09 14:22:35 2014 WARNING: ASM communication error: op 0 state 0x0 (15055) ERROR: direct connection failure

TNS-12541: TNS:no listener TNS-12560: TNS:protocol adapter error TNS-00511: No listener Linux Error:

今天是2014-06-17,遇到一个非常奇怪的问题,可能之前测试修改监听的原因,导致监听启动后自动关闭,特此记录一下整个处理过程, 监听配置文件信息如下: [[email protected] admin]$ more listener.ora # listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora # Generated by Or

error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file

安装rac10g,出现如下错误: [[email protected] oracle]# /u01/product/crs/root.sh WARNING: directory '/u01/product' is not owned by root Checking to see if Oracle CRS stack is already configured /etc/oracle does not exist. Creating it now. Setting the permission

sysbench: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file

安装编译完后sysbench后,报错. 报错信息: [[email protected] dongbo]# sysbench -v sysbench: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory 解决方法: 1. [[email protected] dongbo]# ls -l /usr/local/my

synergy: error while loading shared libraries: libdns_sd.so.1: cannot open shared object file:

在Ubuntu 16.04上使用deb文件安装Synergy时报错,解决过程如下: 安装时提示安装失败,在命令行中打开软件时提示 yang@work:~$ synergy synergy: error while loading shared libraries: libdns_sd.so.1: cannot open shared object file: No such file or directory 按照https://sourceforge.net/p/beebeep/tickets