Microchip
直播中

孔朱磊

7年用户 929经验值
私信 关注
[问答]

pic18f47k42.h错误?

嗨,我最近买了一个PIC18F47 K42 XPress评估套件。在尝试编译一个非常简单的项目时,我收到了这个错误:程序文件(x86)Microchip xC8v1.44包含pIC18F47 K42.h:382:错误:(1098)变量“StasuSuthad”(E:Project文件(x86)Microchip xC8v1.44 包含 PIC18F47 K42·h:382)在其显示的头文件中的冲突声明下面的DelCursStudio向上和向下滚动文件,我看到已经用这种方式声明了多个变量。但是这一个给出了错误。有人有任何建议来解决这个问题吗?此外,头文件几乎是2MB,不能附加在这里。
C(7.23 KB)-下载50次

以上来自于百度翻译


      以下为原文

    hi,
i recently bought a pic18f47k42 xpress evaluation kit. upon trying to compile a very simple project i receive this error

E:Program Files (x86)Microchipxc8v1.44includepic18f47k42.h:382: error: (1098) conflicting declarations for variable "STATUS_SHAD" (E:Program Files (x86)Microchipxc8v1.44includepic18f47k42.h:382)


in the header file it shows the following delcarations
// Register: STATUS_SHAD
#define STATUS_SHAD STATUS_SHAD
extern volatile unsigned char STATUS_SHAD @ 0x3884;

scrolling up and down the file, i see that multiple variables have been declared this way. but this one gives the error.

Does anyone has any suggestions to sort this out?

also the header file is almost 2Mb, can't attach it here.
   Attachment(s)

main.c (6.75 KB) - downloaded 41 times
mcc.c (7.23 KB) - downloaded 50 times

回帖(9)

贾飞小

2018-10-19 16:29:20
尝试发布完整的代码,Meal.C和配置位。信息很少,人们很难猜测。

以上来自于百度翻译


      以下为原文

    Try to post your full code, main.C and configuration bits. It will be difficult for people to guess with little information supplied.
举报

林芳

2018-10-19 16:46:29
刚才意识到这条线在开始的时候。把它改为正确的名称。现在它建造了这个项目。仍然不知道如何编程XPress评估板。拖拽和删除HEX文件不起作用。

以上来自于百度翻译


      以下为原文

    just realized that there is this line at the beginning of main.c
 
#include
 
changed it to the correct name. and now it builds the project. Still cant figure out how to program the xpress evaluation board. Dragging and droping the hex file doesnt work
 
举报

蒋喜玲

2018-10-19 17:05:08
可能因为Ma.C有这条直线-你不应该改变它-你应该删除它。已经包含正确的文件-xc.h。

以上来自于百度翻译


      以下为原文

    Probably because main.c has this line
#include
 
edit -
you shouldn't change it - you should remove it. mcc.h already includes the correct file - xc.h
举报

吴键洪

2018-10-19 17:16:01
+1删除特定于设备的头文件。你不应该包括他们,因为这个确切的原因。只是包括XC.H照顾你。

以上来自于百度翻译


      以下为原文

   
+1
Get rid of the device specific header file. You should NEVER include them, for this precise reason.
Just including xc.h takes care of it for you.
 
举报

更多回帖

发帖
×
20
完善资料,
赚取积分