+ -
当前位置:首页 → 问答吧 → slk10.1下 zhcon-0.2.3编译安装出错

slk10.1下 zhcon-0.2.3编译安装出错

时间:2005-08-25

来源:互联网

./configure时一切正常
make的时候出现以下错误:
代码:
In file included from zhcon.cpp:54:
inputclient.h: In static member function `static void
 InputClient::SetConsole(Console*)':
inputclient.h:37: error: `assert' undeclared (first use this function)
inputclient.h:37: error: (Each undeclared identifier is reported only once for
 each function it appears in.)
zhcon.cpp:262:6: warning: #warning OPEN_MAX undefined so far,try define it to 64
make[3]: *** [zhcon.o] 错误 1
make[3]: Leaving directory `/root/zhcon-0.2.3/src'
make[2]: *** [all-recursive] 错误 1
make[2]: Leaving directory `/root/zhcon-0.2.3/src'
make[1]: *** [all-recursive] 错误 1
make[1]: Leaving directory `/root/zhcon-0.2.3'
make: *** [all] 错误 2
这个是什么问题?

作者: failsafe   发布时间: 2005-08-25

找到inputclient.h和mouse.cpp,在文件中加入#include <assert.h>

作者: shockman   发布时间: 2005-08-25

解决。谢谢。
可是,这个解决的方法也太奇怪了吧?

作者: failsafe   发布时间: 2005-08-25

楼主没看置顶帖 :(

作者: windrose   发布时间: 2005-08-25

您看一下基础版就会非常开心
那的新手基本都不看的
苦中作乐

作者: 甜甜的笑一个   发布时间: 2005-08-26

置顶帖里说,要在两个源文件里加入这一句:
#include <assert.h>
我试了一下,果然可以编译了。请问这是为什么?以及怎么知道应该加入这个头文件的?

作者: shadkong   发布时间: 2005-08-26

assert.h这个头文件包含了编译所需要的定义函数

作者: 妖狐藏马   发布时间: 2005-08-27

引用:
作者: 妖狐藏马
assert.h这个头文件包含了编译所需要的定义函数
难道说这个是软件的bug?那这个错误也太低级了吧。还是说这个是在slackware里面才会出现的问题?

作者: failsafe   发布时间: 2005-08-27

应该不会是软件的 bug,估计只是在 Slackware 下才会这样的。
是不是在其它发行版里对应的头文件不叫 assert.h,而且 zhcon 默认使用的头文件也不是 assert.h,所以造成了这种问题?

作者: shadkong   发布时间: 2005-08-27

哈哈
这个问题很早就有了

作者: linuxcpp   发布时间: 2005-08-28