2008年6月23日 星期一

9426135 鍾昱宏 我檢視的五個問題(5-5)

問題:在重新編譯NS2時,會有下列的問題出現

問題敘述:

proxytrace2any.cc: In function `int main(int, char**)':
proxytrace2any.cc:112: error: `IsLittleEndian' undeclared (first use this function)
proxytrace2any.cc:112: error: (Each undeclared identifier is reported only once for each function it appears in.)
proxytrace2any.cc:120: error: `ToOtherEndian' undeclared (first use this function)
make[1]: *** [proxytrace2any.o] Error 1


問題答案:

問題點在於 proxytrace2any.cc這隻程式,因為使用到兩個未經定義(undeclared) 的函數。修正的方法:找到下列檔案 /indep-utils/webtrace-conv/dec/my-endian.h

#ifndef _ENDIAN_H_ #endif 兩行註解
起來,其他地方不變。

//#ifndef _ENDIAN_H_
#define _ENDIAN_H_
#include "proxytrace.h"

/* detects endian-ness */
int IsLittleEndian(void);

/* changes endian-ness */
void ToOtherEndian(TEntry *e);
//#endif

沒有留言: