首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Eclipse中构建项目时遇到问题

在Eclipse中构建项目时遇到问题
EN

Stack Overflow用户
提问于 2010-11-18 16:04:38
回答 1查看 588关注 0票数 0

在Eclipse中构建项目时,我得到了以下输出:

代码语言:javascript
复制
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

有问题的一行是:

代码语言:javascript
复制
int gettimeofday(struct timeval *tv, struct timezone *tzp)

此函数在头文件中声明。

你能帮帮我吗?

EN

回答 1

Stack Overflow用户

发布于 2010-11-21 04:17:37

GCC吐槽struct timezone未申报在文件中的几行以下,它会报告取消对指向不完整类型的指针的引用。我怀疑gettimeofday.c:41使用了tzp参数。您是否包含了struct timezone的声明?在我的系统上,它是用/usr/include/linux/time.h声明的。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/4212741

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档