免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2465 | 回复: 0
打印 上一主题 下一主题

[求助]uclinux加入semaphore.h后编译出错 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-02-15 22:22 |只看该作者 |倒序浏览
在uclinux中编译应用程序,没有加入信号量编译没有任何问题,但是加入信号量后,就编译过不了,出现如下错误:
arm-elf-gcc  -O2 -g -fomit-frame-pointer   -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED -I/home/dgy/L
JD/myuClinux/lib/libc/include -I/home/dgy/LJD/myuClinux/lib/libm -I/home/dgy/LJD/myuClinux/lib/libcrypt_o
ld -I/home/dgy/LJD/myuClinux -fno-builtin -nostartfiles -I/home/dgy/LJD/myuClinux/linux-2.4.x/include   -
c -o gpioetest.o gpioetest.c
/home/dgy/LJD/myuClinux/lib/libc/include/asm/semaphore.h:18: parse error before `wait_queue_head_t'
/home/dgy/LJD/myuClinux/lib/libc/include/asm/semaphore.h:18: warning: no semicolon at end of struct or union
/home/dgy/LJD/myuClinux/lib/libc/include/asm/semaphore.h: In function `sema_init':
/home/dgy/LJD/myuClinux/lib/libc/include/asm/semaphore.h:47: dereferencing pointer to incomplete type
/home/dgy/LJD/myuClinux/lib/libc/include/asm/semaphore.h:48: dereferencing pointer to incomplete type
/home/dgy/LJD/myuClinux/lib/libc/include/asm/semaphore.h:49: dereferencing pointer to incomplete type
/home/dgy/LJD/myuClinux/lib/libc/include/asm/semaphore.h: In function `sem_getcount':
/home/dgy/LJD/myuClinux/lib/libc/include/asm/semaphore.h:130: dereferencing pointer to incomplete type

这个wait_queue_head是semaphore.h中struct semaphore.h结构体中的一个成员。

但是我在uclinux里的驱动程序中加入信号量,则编译没有任何问题。

不知道这是怎么会事!请知道的大侠指点一下,万分感谢!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP