0
雖然建立在Eclipse中的一個項目,我得到了以下的輸出:問題的建築項目在Eclipse
make all
Building file: ../Source/gettimeofday.c
Invoking: GCC C Compiler
gcc -I"/root/Desktop/Eclipse/openwsman/Header" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -
MF"Source/gettimeofday.d" -MT"Source/gettimeofday.d" -o"Source/gettimeofday.o" "../Source/gettimeofday.c"
../Source/gettimeofday.c:38: warning: ‘struct timezone’ declared inside parameter list
../Source/gettimeofday.c:38: warning: its scope is only this definition or declaration, which is probably not
what you want
../Source/gettimeofday.c: In function ‘gettimeofday’:
../Source/gettimeofday.c:41: error: dereferencing pointer to incomplete type
../Source/gettimeofday.c:41: error: dereferencing pointer to incomplete type
make: *** [Source/gettimeofday.o] Error 1
問題的行是:
int gettimeofday(struct timeval *tv, struct timezone *tzp)
此功能在頭文件中聲明。
你能幫我嗎?
你能在gettimeofday.c的第41行附近粘貼代碼嗎?上面的行是方法的聲明,它看起來很好。 – 2010-11-18 08:24:01