用ch375b在IAR5.4下加入ch375hfu.r79庫的問題

原來的工程,在KEIL下編譯運行正常,想轉(zhuǎn)到IAR,換了個ch375hfu.r79庫,就不對了: 加入ch375hfu.r79和ch375hfu.H和CH375HFT.c后,編譯通過,Linking 時出現(xiàn) Error[Li006]: duplicate definitions for "EXTI_InitStructure"; in "E:\SJC5T\SJC5TFOIAR228\Debug\Obj\CH375HFT.o", and "E:\SJC5T\SJC5TFOIAR228\Debug\Obj\crun.o" 等等同一類的問題, EXTI_InitStructure在MAIN.h中定義了,在CH375HFT.c中沒有找到。 請問什么原因?是我的庫加的不對,還是哪里要設(shè)置 ch375hfu.r79和ch375hfu.H用的是\ARM32\FILELIBU_CX5里的 盼回復(fù),謝謝


熱門產(chǎn)品 : USB3.0 HUB控制器:CH634

編譯的問題,我們知道的也就告訴你,這個編譯器我也沒用過 在網(wǎng)上查了下,可能是你復(fù)制的時候不注意出錯或者你程序中哪邊重新定義了,主要有兩種可能,你自己查下: 1、在編譯文件定義全局變量的時候,編譯出現(xiàn)錯誤,經(jīng)查是在另一個.c文件里面把我這個聲明的變量又重新給賦值了一次,這個是不對的,如果你想定義全局變量的話,或者向調(diào)用其他.c文件里面的定義的全局變量的話,那么你在引用的.c文件里面加上extern char num;類似的語句就可以,不能重新給這個變量在定義的時候賦值 #iniclude “…”

unsigned char Buffer[1000]; //定義了一個1000字節(jié)的接收發(fā)送緩沖區(qū) unsigned char host_mac_addr[6]= { 0x00, 0x1e, 0xc9, 0x45, 0x61, 0x9e }; unsigned char mac_addr[6] = {0x08,0x90,0x90,0x90,0x90,0x90 };//{ 0x52, 0x54, 0x4c, 0x38, 0xf7, 0x42 }; unsigned char ip_addr[4] = { 192, 168, 0, 21 };

unsigned char host_ip_addr[4] = { 192, 168, 0, 100 }; unsigned int packet_len; //接收、發(fā)送數(shù)據(jù)包的長度,以字節(jié)為單位

int main()

{

return 0;

}

/------------------------------------在get.c調(diào)用---------------------------------------------------------------------------------------------------------

#iniclude “…”

extern unsigned char Buffer[1000]; //定義了一個1000字節(jié)的接收發(fā)送緩沖區(qū) extern unsigned char host_mac_addr[6]; extern unsigned char mac_addr[6] ; extern unsigned char ip_addr[4] ;

extern unsigned char host_ip_addr[4] ; extern unsigned int packet_len; //接收、發(fā)送數(shù)據(jù)包的長度,以字節(jié)為單位

void get()

{

} 2、程序中與重復(fù)定義了模塊,需要把它找出來并Remove掉就可以了。


謝謝,那個毛病找到了。有個地方寫錯了。還有個錯誤: Error[Li005]: no definition for "CH375FileClose" [referenced from E:\SJC5T\SJC5TFOIAR228\Debug\Obj\CH375HFT.o] Error[Li005]: no definition for "CH375DiskConnect" [referenced from E:\SJC5T\SJC5TFOIAR228\Debug\Obj\CH375HFT.o] Error[Li005]: no definition for "CH375DiskReady" [referenced from E:\SJC5T\SJC5TFOIAR228\Debug\Obj\CH375HFT.o] Error[Li005]: no definition for "CH375FileOpen" [referenced from E:\SJC5T\SJC5TFOIAR228\Debug\Obj\CH375HFT.o] Error[Li005]: no definition for "CH375DiskStatus" [referenced from E:\SJC5T\SJC5TFOIAR228\Debug\Obj\CH375HFT.o] Error[Li005]: no definition for "CH375vFileSize" [referenced from E:\SJC5T\SJC5TFOIAR228\Debug\Obj\CH375HFT.o] Error[Li005]: no definition for "CH375FileReadX" [referenced from E:\SJC5T\SJC5TFOIAR228\Debug\Obj\CH375HFT.o] Error[Li005]: no definition for "CH375IntStatus" [referenced from E:\SJC5T\SJC5TFOIAR228\Debug\Obj\CH375HFT.o] Error[Li005]: no definition for "CH375GetVer" [referenced from E:\SJC5T\SJC5TFOIAR228\Debug\Obj\CH375HFT.o] Error[Li005]: no definition for "CH375Init" [referenced from E:\SJC5T\SJC5TFOIAR228\Debug\Obj\CH375HFT.o] Error[Li005]: no definition for "CH375LibConfig" [referenced from E:\SJC5T\SJC5TFOIAR228\Debug\Obj\CH375HFT.o] 這些函數(shù)在是CH375HFU.H里有引用,而且ch375hfu.r79庫也加到項目里了。怎么不對?難道我加錯了?


謝謝,把ch375hfu.r79庫改成.A,貌似這個沒有錯誤了。不好意思


IAR FOR ARM的庫后綴不是.r79么?


只有登錄才能回復(fù),可以選擇微信賬號登錄

国产91精品新入口,国产成人综合网在线播放,九热这里只有精品,本道在线观看,美女视频a美女视频,韩国美女激情视频,日本美女pvp视频