程序在编译时提示
Error [192] E:\pro\SHE-Z-30\SHE-Z-30.c; 91.1 undefined identifier "OPTION_REG"
Error [192] E:\pro\SHE-Z-30\SHE-Z-30.c; 96.1 undefined identifier "WPU"
Error [192] E:\pro\SHE-Z-30\SHE-Z-30.c; 105.1 undefined identifier "GPIO"
Error [192] E:\pro\SHE-Z-30\SHE-Z-30.c; 106.1 undefined identifier "IOC"
Error [192] E:\pro\SHE-Z-30\SHE-Z-30.c; 108.1 undefined identifier "TRISIO"
Error [192] E:\pro\SHE-Z-30\SHE-Z-30.c; 109.1 undefined identifier "GP4"
Error [192] E:\pro\SHE-Z-30\SHE-Z-30.c; 135.1 undefined identifier "GP1"
Error [192] E:\pro\SHE-Z-30\SHE-Z-30.c; 194.1 undefined identifier "GP4"
Error [192] E:\pro\SHE-Z-30\SHE-Z-30.c; 196.5 undefined identifier "GP0"
Error [192] E:\pro\SHE-Z-30\SHE-Z-30.c; 267.1 undefined identifier "GP1"
Error [192] E:\pro\SHE-Z-30\SHE-Z-30.c; 403.7 undefined identifier "GP1"
Error [192] E:\pro\SHE-Z-30\SHE-Z-30.c; 407.7 undefined identifier "GP1"
Error [192] E:\pro\SHE-Z-30\SHE-Z-30.c; 446.1 undefined identifier "GP1"
都是功能寄存器未定义,但是我的程序里已添加了:#include <pic.h>
如下:
#include <pic.h>
__CONFIG(OSC_INTRC_NOCLKOUT&WDT_OFF&PWRTE_ON&MCLRE_ON&CP_ON&IOSCFS_4MHZ&BOREN_ON&WRT_ALL);
谁能帮忙解答下哪里出问题了??谢谢了!
------解决方案--------------------
查一下在哪个头定义了,这个头文件在哪里。
<>是系统路径,是否能找到。还有""是用户路径,不行写一个绝对路径看看
------解决方案--------------------
点击右键,看看能不能正确跳转到定义的地方。
------解决方案--------------------
有跟芯片相关的宏定义吗? 不同型号可能的寄存器不同。。。