• slider image 514
  • slider image 516
  • slider image 517
  • slider image 518
  • slider image 519
:::


Browsing this Thread:   1 Anonymous Users






Re: PICC編譯時將錯誤指向了頭文件了
#4
版主
版主


查看用戶資訊
ZFLocation[0][0] 有沒有初始值的設定?

發表於: 2008/12/8 14:41
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: PICC編譯時將錯誤指向了頭文件了
#3
新會員
新會員


查看用戶資訊
谢谢
這個問題剛剛解決了,的確是在主程序中少了一個大括號。
但又出現了新的問題,提示下面段錯誤
for(n= ZFLocation[0][0];n>=0;n--)
{
i= ZFLocation[0][n];
DISPONEWORD();
}
ZFLocation數組是我在頭文件中定義的數組unsigned char類型
錯誤提示
Error[000] D:\Program Files\Microchip\SHIYONG\DispInitbar.c 20 : undefined identifier: ZFLocation
Error[000] D:\Program Files\Microchip\SHIYONG\DispInitbar.c 20 : pointer required
我是初學者,謝謝大家

發表於: 2008/12/6 12:50
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: PICC編譯時將錯誤指向了頭文件了
#2
版主
版主


查看用戶資訊
會不會是主程式李少了括號,分號等之類東西,造成 include 的錯誤。
不要懷疑,Hi-Tech PICC 所提供的 H 檔是沒有問題的。

probable missing '}' in previous block 的提示檢查一下主程式是否漏掉了 大括號?

發表於: 2008/12/6 11:45
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


PICC編譯時將錯誤指向了頭文件了
#1
新會員
新會員


查看用戶資訊
我做了一個小顯示器程序,編譯時發現了一個很奇怪的問題,出錯信息總是指向頭文件,
它的意思是頭文件的
static volatile unsigned char TMR0 @ 0x01;行
少了半個大括號,當我將之一行注釋掉,它又会指向下一行,提示同样的错误,高手幫我看看吧
一般来说头文件是不会错的吧,可是我是在不知道怎么回事。
这是编译的出错信息:
Clean: Deleting intermediary and output files.
Clean: Deleted file "D:\Program Files\Microchip\SHIYONG\MAIN.cce".
Clean: Done.
Executing: "d:\program files\microchip\picc\BIN\PICC.EXE" -C -E"MAIN.cce" "MAIN.c" -O"MAIN.obj" -I"D:\Program Files\Microchip\PICC\include" -Zg9 -O -ASMLIST -ICD -Q -MPLAB -16F73
Error[000] D:\Program Files\Microchip\PICC\include\pic16f7x.h 16 : probable missing '}' in previous block
Halting build on first failure as requested.
BUILD FAILED: Sat Dec 06 09:34:07 2008
这是頭文件的一部分
/*
* Header file for the Microchip
* PIC 16F72 chip
* PIC 16F73 chip
* PIC 16F74 chip
* PIC 16F76 chip
* PIC 16F77 chip
* Midrange Microcontroller
*/

#if defined(_16F74) || defined(_16F77)
#define __PINS_40
#endif


static volatile unsigned char TMR0 @ 0x01;
static volatile unsigned char PCL @ 0x02;
static volatile unsigned char STATUS @ 0x03;
static unsigned char FSR @ 0x04;
static volatile unsigned char PORTA @ 0x05;
static volatile unsigned char PORTB @ 0x06;
static volatile unsigned char PORTC @ 0x07;

#ifdef __PINS_40

發表於: 2008/12/6 10:29
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------