使用ch375 mega64 FILELIBJ_V5 iaravr5.11出現(xiàn)如下問題,請(qǐng)指教

Building configuration: Troch690 - Debug Updating build tree... Linking Warning[w6]: Type conflict for external/entry "mCmdParam", in module CH375MAI against external/entry in module usb; class/struct/union field names do not match: Other16 vs Query /* In module CH375MAI: */ CMD_PARAM_I mCmdParam; typedef CMD_PARAM CMD_PARAM_I; typedef union _CMD_PARAM CMD_PARAM; /* In module usb: */ CMD_PARAM_I mCmdParam; typedef CMD_PARAM CMD_PARAM_I; typedef union _CMD_PARAM CMD_PARAM; Warning[w35]: There is more than one definition for the struct/union type with tag '_CMD_PARAM'; class/struct/union field names do not match: Query vs Other16 union _CMD_PARAM /* Elements: 19, Bytes: 30 */ { struct /* Elements: 1, Bytes: 30 */ { UINT8 mBuffer[30]; } Other; struct /* Elements: 4, Bytes: 13 */ { UINT32 mReserved; UINT32 mTotalSector; UINT32 mFreeSector; UINT8 mDiskFat; } Query; struct /* Elements: 1, Bytes: 30 */ { UINT8 mPathName[30]; } Open; struct Enumer; struct /* Elements: 1, Bytes: 1 */ { UINT8 mUpdateLen; } Close; struct Create; struct Erase; struct /* Elements: 4, Bytes: 9 */ { UINT32 mFileSize; UINT16 mFileDate; UINT16 mFileTime; UINT8 mFileAttr; } Modify; struct /* Elements: 1, Bytes: 4 */ { UINT32 mSectorOffset; } Locate; struct /* Elements: 1, Bytes: 1 */ { UINT8 mSectorCount; } Read; struct Write; struct /* Elements: 3, Bytes: 10 */ { UINT8 mSectorCount; UINT8 mReserved[7]; PUINT8 mDataBuffer; } ReadX; struct WriteX; struct /* Elements: 1, Bytes: 4 */ { UINT32 mDiskSizeSec; } DiskSize; struct /* Elements: 1, Bytes: 4 */ { UINT32 mByteOffset; } ByteLocate; struct /* Elements: 2, Bytes: 30 */ { UINT8 mByteCount; UINT8 mByteBuffer[29]; } ByteRead; struct ByteWrite; struct /* Elements: 3, Bytes: 6 */ { UINT8 mSaveVariable; UINT8 mReserved[3]; PUINT8 mBuffer; } SaveVariable; union /* Elements: 2, Bytes: 21 */ { struct /* Elements: 10, Bytes: 21 */ { UINT32 mCBW_Sig; UINT32 mCBW_Tag; UINT8 mCBW_DataLen; UINT8 mCBW_DataLen1; UINT8 mCBW_DataLen2; UINT8 mCBW_DataLen3; UINT8 mCBW_Flag; UINT8 mCBW_LUN; UINT8 mCBW_CB_Len; UINT8 mCBW_CB_Buf[6]; } mCBW; struct /* Elements: 5, Bytes: 14 */ { UINT32 mCSW_Sig; UINT32 mCSW_Tag; UINT32 mCSW_Residue; UINT8 mCSW_Status; UINT8 mReserved; } mCSW; } BOC; }; typedef unsigned char UINT8; typedef unsigned long UINT32; typedef unsigned short UINT16; typedef unsigned char * PUINT8; union _CMD_PARAM /* Elements: 19, Bytes: 30 */ { struct /* Elements: 1, Bytes: 30 */ { UINT8 mBuffer[30]; } Other; struct /* Elements: 1, Bytes: 30 */ { UINT16 mBuffer16[15]; } Other16; struct /* Elements: 1, Bytes: 28 */ { UINT32 mBuffer32[7]; } Other32; struct /* Elements: 4, Bytes: 13 */ { UINT32 mReserved; UINT32 mTotalSector; UINT32 mFreeSector; UINT8 mDiskFat; } Query; struct /* Elements: 1, Bytes: 30 */ { UINT8 mPathName[30]; } Open; struct Enumer; struct /* Elements: 1, Bytes: 1 */ { UINT8 mUpdateLen; } Close; struct Create; struct Erase; struct /* Elements: 6, Bytes: 16 */ { UINT32 mFileSize; UINT16 mFileDate; UINT16 mFileTime; UINT8 mFileAttr; UINT8 mReserved[3]; UINT32 mOldSize; } Modify; struct /* Elements: 1, Bytes: 4 */ { UINT32 mSectorOffset; } Locate; struct /* Elements: 6, Bytes: 10 */ { UINT8 mSectorCount; UINT8 mActualCount; UINT8 mLbaCount; UINT8 mRemainCount; UINT32 mLbaStart; PUINT8X mDataBuffer; } Read; struct /* Elements: 7, Bytes: 14 */ { UINT8 mSectorCount; UINT8 mActualCount; UINT8 mLbaCount; UINT8 mAllocCount; UINT32 mLbaStart; PUINT8X mDataBuffer; UINT32 mSaveValue; } Write; struct /* Elements: 1, Bytes: 4 */ { UINT32 mDiskSizeSec; } DiskSize; struct /* Elements: 1, Bytes: 4 */ { UINT32 mByteOffset; } ByteLocate; struct /* Elements: 2, Bytes: 30 */ { UINT8 mByteCount; UINT8 mByteBuffer[29]; } ByteRead; struct ByteWrite; struct /* Elements: 3, Bytes: 6 */ { UINT8 mSaveVariable; UINT8 mReserved[3]; PUINT8X mBuffer; } SaveVariable; union /* Elements: 2, Bytes: 21 */ { struct /* Elements: 9, Bytes: 21 */ { UINT32 mCBW_Sig; UINT32 mCBW_Tag; UINT8 mCBW_DataLen; UINT8 mCBW_DataLen1; UINT16 mCBW_DataLen2; UINT8 mCBW_Flag; UINT8 mCBW_LUN; UINT8 mCBW_CB_Len; UINT8 mCBW_CB_Buf[6]; } mCBW; struct /* Elements: 5, Bytes: 14 */ { UINT32 mCSW_Sig; UINT32 mCSW_Tag; UINT32 mCSW_Residue; UINT8 mCSW_Status; UINT8 mReserved; } mCSW; } BOC; }; typedef unsigned char UINT8; typedef unsigned short UINT16; typedef unsigned long UINT32; typedef unsigned char * PUINT8X; Total number of errors: 0 Total number of warnings: 2

我使用的頭文件和.r90文件出自同一個(gè)FILELIBJ_V5文件夾下,這個(gè)文件夾從貴公司網(wǎng)站上下載得到。 我分析了一下,是因?yàn)閷?duì)同一個(gè)變量在兩個(gè)地方(是個(gè)union變量)定義不一致所致。這兩個(gè)地方,是指下載下來的頭文件和.r90文件。

同一個(gè)全局變量只可以在一個(gè)地方聲明,其他地方可以引用 mCmdParam怎么會(huì)在usb中定義的?


這個(gè)警告不影響,可以正常使用.


回答1樓: 我確實(shí)只在一個(gè)地方定義這個(gè)變量,而在頭文件中,只是聲明了變量而已。但是,如果那樣做的話,編譯器干脆報(bào)了錯(cuò)誤,說我的CMD_PARAM這個(gè)類型沒有定義,所以關(guān)鍵在于CMD_PARAM這個(gè)類型必須先定義好才能使用,而mCmdParam這個(gè)變量倒確實(shí)是可以先不定義而先聲明后使用的。


這個(gè)警告是去不掉的,是由于庫(kù)里面的原因,但是不影響你的正常使用.不用檢查了.


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

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