keil出现错误declaration is incompatible

错误来源

.\ECAT\inc\STM32appl.h(38): error: #147: declaration is incompatible with "unsigned shortnPdInputSize" (declared at line 396 of ".\ECAT\inc\ecatslv.h")

extern UINT16 nPdInputSize;

.\ECAT\inc\STM32appl.h(39): error: #147: declaration is incompatible with "unsigned short nPdOutputSize" (declaredat line 398 of ".\ECAT\inc\ecatslv.h")

翻译:声明是不相容的

描述:在函数还没有声明之前就已经使用了.多出现在两种情况:第一种,函数体还没有写,就已经用到了它,这种情况多出现在写一个程序的大体结构中,只是简单写一下框架.第二种情况比较常见,函数a调用函数b,但函数b的函数体在函数a的下面:

void a(void) //函数a的实体

{

b(); //调用函数b

}

void b(void) //函数b的实体

{

}

这样如果点编译,就会产生

我已经依据此方法解决该问题。。。

但是在st官方的解决方法中,不是这样的。

core_cm3.h文件太老了,2009年的,与新版本的IAR6.3不兼容,IAR 6.3用的是2011年的,使用IAR自带的就行了

1,把老的core_cm3.h去掉,删除,或者改成core_cm3.h.old。

2,Project ->Options -> General Options -> Library Configuration -> Use CMSIS,右下角的选项中选择 use CMSIS

具体内容在网址

http://www.emcu.it/ARM_Compiler/IAR/IAR_tips_and_tricks.html

时间: 2024-08-11 19:10:49

keil出现错误declaration is incompatible的相关文章

mfc视类中错误:IntelliSense: declaration is incompatible with。。。解决方案

基本情况是我自己写了一个类: class CDib {....} 然后在mfc自动生成的"工程名Dlg.cpp"中使用类CDib,我的工程名是MfcPictureProcessing,所以类是class CMfcPictureProcessingDlg,下面是视图类.h文件里: class CMfcPictureProcessingDlg: public CDialogEx { ... CDib *Dlgdib; CPalette* CreateBitmapPalette(CDib *

Keil - 编译错误总结 01

Keil 编译 STM32project,出现下述错误. 并且.   Options for Target  -> Output   -  Browse  Information 选项无法勾选.  问题原因: 系统时间.不是当前时间. 解决的方法: 将系统时间改动为当前时间时间.

Keil常见错误汇总及处理方式

1. warning: #767-D: conversion from pointer to smaller integer 解释:将指针转换为较小的整数 影响:可能造成的影响:容易引起数据截断,造成不必要的数据丢失.如果出现bug,很难调试. 改正:尽量避免这种转换,避免不了要确定转换的数据不会引起数据丢失. 2. warning: #177-D:variable "i" was declared but never referenced 解释:变量i定义了,但是没有使用 影响:没有

keil软件错误总结.doc

KEIL编译错误信息表   错误代码及错误信息 错误释义 error 1: Out of memory 内存溢出 error 2: Identifier expected 缺标识符 error 3: Unknown identifier 未定义的标识符 error 4: Duplicate identifier 重复定义的标识符 error 5: Syntax error 语法错误 error 6: Error in real constant 实型常量错误 error 7: Error in

Hadoop错误日志

1.错误日志:Directory /tmp/hadoop-root/dfs/name is in an inconsistent state: storage directory does not exist or is not accessible. 错误原因:在Linux下Hadoop等的各种数据默认保存在 /tmp目录下.当重启系统后 /tmp目录中的数据信息被清除,导致Hadoop启动失败.确定目录 /tmp/hadoop-root/dfs/name是否存在解决方案: 使用命令bin/h

解决Zend加密的PHP页面出现Fatal error: Incompatible file format: The encoded file has format major ID 1, whereas the Loader expects 4 in

打开php页面出现如下错误: Fatal error: Incompatible file format: The encoded file has format major ID 1, whereas the Loader expects 4 in 可能是以下原因:1.未安装php解密扩展; 2.未安装相应的php解密扩展. 由于Zend Guard 5.1版本更新了加密算法,5.1版本与5.0版本分别使用了两套相互不兼容的加密算法,对应的解密算法也不再兼容. 因此,用Zend Guard 5

Cocos2d-x Vector——vector iterators incompatible

***************************************转载请注明出处:http://blog.csdn.net/lttree****************************************** 使用 cocos2d-x 中的 Vector的时候, 在删除某个对象的时候出现了个错误,很崩溃啊..... Vector<Bullet*>* bullets; // 遍历每个bullet,让他们自己更新 for ( auto it = bullets->be

lPeer reports incompatible or unsupported protocol version.

linux系统git clone 报错误 Peer reports incompatible or unsupported protocol version. 升级curl yum update -y nss curl libcurl 原文地址:https://www.cnblogs.com/betobe/p/12348356.html

在IAR(EWARM)中移植STM32固件库

一.移植环境说明 (1).win10系统 (2).IAR(EWARM)7.7 (3).STM32标准固件库3.5.0 http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32-standard-peripheral-libraries/stsw-stm32054.html 二.移植步骤 (1).首先建立一个C语言的main工