LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: lofeng410

请教几个小问题

[复制链接]
发表于 2008-11-5 10:59:22 | 显示全部楼层
我找到了,在LinuxSir论坛就有。

http://www.linuxsir.cn/bbs/thread256887.html
回复 支持 反对

使用道具 举报

发表于 2008-11-5 11:04:34 | 显示全部楼层
Post by lofeng410;1904212
这个done 最早出现在
这个时候done还没有创建,就直接当作搜索的对象,有点不好理解
而且done在shell里面是有特殊用途的,就更让人困惑了


是的,我觉得要是把done改个名字就更好了,不容易混淆。

其实这正是我不喜欢Bash编程的原因。变量定义太随意,很容易搞混的。我还是喜欢C语言,呵呵。

不过Bash编程确实很方便。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-5 11:11:36 | 显示全部楼层
Post by ti8er;1904217
Advanced Bash-Scripting Guide
高级Shell编程指南,杨春敏,黄毅译

这是公认的最好的Shell编程手册,仅仅第3章就列出了所有的特殊符号,看得我都头大……

老大说的是这本书啊 早有耳闻 只是一直没有去看过 呵呵~~

在ubuntu的wiki上也搜索到很多关于bash编程教程~~
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-5 11:14:23 | 显示全部楼层
Post by ti8er;1904225
是的,我觉得要是把done改个名字就更好了,不容易混淆。

其实这正是我不喜欢Bash编程的原因。变量定义太随意,很容易搞混的。我还是喜欢C语言,呵呵。

不过Bash编程确实很方便。


这个时候done还没有创建,就直接当作搜索的对象,这样也可以的?

C语言在变量的命名上好很多 呵呵~~
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-6 12:53:52 | 显示全部楼层
在编译mesa时遇到这些错误:(这些提示信息中包含很多的乱码,除去那些乱码,就是下面显示的信息了)
../common/xmlconfig.c:937: error: ‘struct OptConfData’ has no member  named ‘parser’
../common/xmlconfig.c:939: error: ‘struct OptConfData’ has no member named ‘ignoringDevice’
../common/xmlconfig.c:940: error: ‘struct OptConfData’ has no member named ‘ignoringApp’
../common/xmlconfig.c:941: error: ‘struct OptConfData’ has no member named ‘inDriConf’
../common/xmlconfig.c:942: error: ‘struct OptConfData’ has no member named ‘inDevice’
../common/xmlconfig.c:943: error: ‘struct OptConfData’ has no member named ‘inApp’
../common/xmlconfig.c:944: error: ‘struct OptConfData’ has no member named ‘inOption’
../common/xmlconfig.c:946: warning: implicit declaration of function ‘parseOneConfigFile’
从提示信息上可以看出是xmlconfig.c文件中的struct OptConfData问题,但是在该文件中struct OptConfData定义如下:
struct OptConfData {
    const char *name;
    XML_Parser parser;
    driOptionCache *cache;
    GLint screenNum;
    const char *driverName, *execName;
    GLuint ignoringDevice;
    GLuint ignoringApp;
    GLuint inDriConf;
    GLuint inDevice;
    GLuint inApp;
    GLuint inOption;
};

xmlconfig.c中报错的地方程序如下所示:
        userData.parser = p;
        userData.name = filenames;
        userData.ignoringDevice = 0;
        userData.ignoringApp = 0;
        userData.inDriConf = 0;
        userData.inDevice = 0;
        userData.inApp = 0;
        userData.inOption = 0;

userData定义信息:
struct OptConfData userData;
回复 支持 反对

使用道具 举报

发表于 2008-11-6 14:17:18 | 显示全部楼层
MesaLib Dependencies
Required

Xorg Libraries, Xorg Utilities, libdrm-2.3.0, and expat-2.0.1

你确保上面的软件都装上了?
回复 支持 反对

使用道具 举报

发表于 2008-11-6 14:18:42 | 显示全部楼层
提示信息怎么会出现乱码?肯定是英文信息的……

你检查下你的语言环境是怎么一回事?你现在已经把X Window都装完了?还是在什么环境下?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-6 15:10:35 | 显示全部楼层
我是参照CBLFS一步步来做的,那些软件包都装过,但是因为有些地方用到自动编译,就没有去确认是否把所有需要安装的都安装了

我的语言环境是en_US.UTF8
英文信息都是有的 但是夹在着点乱码 把那些乱码用空格替代的话就是正常的
我的X还没有装完 CBLFS中给出的安装顺序是这样的:
Protocol Headers
Utilities
Libraries
libdrm
MesaLib
xbitmaps
Apps
Data
Fonts
Xserver
Drivers
xterm
rman
Configure X
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-6 15:17:02 | 显示全部楼层
Dependencies
Required
-----------------------------------------------------
Xorg Protocol Headers glproto >=1.4.5
Xorg Libraries (including the Xdamage protocol)
Xorg Utilities
libdrm
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-6 16:39:15 | 显示全部楼层
已经装上了 可能是前面Lib部分没有装好 我逐个重装过来的
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表