apue make错误
来源:互联网 发布:深入.net平台和c 编程 编辑:程序博客网 时间:2024/06/03 14:21
gcc -DLINUX -ansi -I/home/alex/apue/apue.2e/include -Wall -D_GNU_SOURCE -DDEBUG -c -o printd.o printd.c
In file included from /usr/include/bits/time.h:86:0,
from /usr/include/time.h:42,
from /usr/include/pthread.h:26,
from printd.c:11:
/usr/include/bits/timex.h:31:7: 错误:expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘.’ token
make[2]: *** [printd.o] 错误 1
make[2]: 离开目录“/home/alex/apue/apue.2e/ipp”
make[1]: *** [linux] 错误 1
make[1]: 离开目录“/home/alex/apue/apue.2e”
In file included from /usr/include/bits/time.h:86:0,
from /usr/include/time.h:42,
from /usr/include/pthread.h:26,
from printd.c:11:
/usr/include/bits/timex.h:31:7: 错误:expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘.’ token
make[2]: *** [printd.o] 错误 1
make[2]: 离开目录“/home/alex/apue/apue.2e/ipp”
make[1]: *** [linux] 错误 1
make[1]: 离开目录“/home/alex/apue/apue.2e”
make: *** [all] 错误 2
出现这个问题的原因是在timex.h的第31行出现了status的定义:
int status; /* clock command/status */
而文件apue.2e/ipp/ipp.h中有宏定义:
#define status u.st
这样编译的时候就出问题了,如编译提示:
expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘.’ token
解决方法是把ipp.h文件里的status改成其他名称,比如Status,再次编译,错误提示status神马的信息,找到status出错的位置,把它改为Status就行了。
此处我的status出错位置在printd.c的第977行中:
i = ntohs(hp->status);
- apue make错误
- apue源码make:/usr/include/bits/timex.h:31:7: 错误:expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ be的解决方法
- apue源码make:/usr/include/bits/timex.h:31:7: 错误:expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ be的解决方法
- apue翻译错误
- apue-局部变量的错误
- CentOS解决apue.h错误
- how to `make` the src code of APUE book
- make常见错误
- make: *** “*.o” 错误 127
- android的make错误
- android make常见错误
- make menuconfig 的错误
- 执行make menuconfig错误
- make: *** [smdk2410_config] 错误 127
- make menuconfig 错误处理
- make menuconfig 错误
- Make menuconfig错误解决
- make 出现的错误
- c++程序员面试题目
- ios url缓存策略——NSURLCache、 NSURLRequest
- 规范编程
- Tomcat源码12之AccessLogValve类
- 《嵌入式系统工程师成长指南》
- apue make错误
- 华为牵手360:狼与狐狸的合作?
- samba服务器的配置
- 【每日面试题】字符串的顺序变化
- 从包括扩展名的文件名中提取出文件名和扩展名
- ARM 汇编 伪指令 MACRO及MEND handle
- c语言如何输出一个菱形
- 数据更新
- NN成长日记