• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::


Browsing this Thread:   1 Anonymous Users






Re: 請教一下平方和開根號..
#7
中級會員
中級會員


查看用戶資訊
原來版本太舊問題,真的很感謝您! m(_ _)m

發表於: 2005/11/15 22:15
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請教一下平方和開根號..
#6
版主
版主


查看用戶資訊
你的版本太舊了,請先移除舊版的 MPLAB IDE 及 C18 後再上網更新版本。

MPLAB IDE v7.22
MPLAB C18 v1.30 Studend Edition Version

http://www.microchip.com/stellent/idc ... ice=SS_GET_PAGE&nodeId=81

發表於: 2005/11/15 14:20
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請教一下平方和開根號..
#5
中級會員
中級會員


查看用戶資訊
您好:
我重新new一個檔案,code完全和您一樣,只是仍然會有

error。還是是我自己的電腦問題。 ><"

Error - could not find definition of symbol 'sqrt' in file 'D:\Research\PIC\test10\test.o'.

我用MPLAB FULL v6.10 及 MPLAB C18-v2.20b-demo-win32

發表於: 2005/11/15 12:41
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請教一下平方和開根號..
#4
版主
版主


查看用戶資訊
用了一斷最簡單的程式,結果正常:
#include <p18f452.h>
#include <math.h>

float a,b;
    
//***************************************
//*             Program Main ( )        *
//***************************************
void main(void)
{
    
    
a=3.14159;

    
b=sqrt(a);

    while(
1);
}


結果 b = 1.772453 ,
我用MPLAB IDE v.710 and MPLAB C18 v2.40.01

發表於: 2005/11/15 11:31
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請教一下平方和開根號..
#3
中級會員
中級會員


查看用戶資訊
您好:

我重新開一個檔案,先include math.h,compilier完後,

再打pow的指令,compilier完還是會出現Error ><

Error - could not find definition of symbol 'pow'

是因為compilier不同嗎?還是有其它可能情況呢? T__T

我是使用 MPLAB-C18&PIC18F452。



發表於: 2005/11/11 21:24
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請教一下平方和開根號..
#2
新會員
新會員


查看用戶資訊
檢查看看是否在include之前就使用到這兩個函數,
這種情形就可能會有找不到函數定義的可能。

我試過,math.h,可以使用這兩個函數。
附帶一提我用的是CCS C-compiler&PIC18F2320作測試。

發表於: 2005/11/11 17:19
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


請教一下平方和開根號..
#1
中級會員
中級會員


查看用戶資訊
不好意思,請問一下我使用的是PIC18F452,用C作Coding
我有include math.h ,但是pow及sqrt不能使用,會有error,
還是沒有這個function呢?
因為這是很常見的計算,但卻不能使用,不知各位先進是否
有無使用過此功能。

下面是compilier後的訊息
Error - could not find definition of symbol 'pow'
Error - could not find definition of symbol 'sqrt'

不好意思,問了一個小問題 ><

發表於: 2005/11/10 22:33
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... ]

教育訓練中心

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