<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/css" href="./clientscript/vbulletin_css/rsstyle.css"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>LinuxSir.Org - Linux 程序设计专题讨论</title>
		<link>http://www.linuxsir.org/bbs</link>
		<description>Linux环境综合程序设计讨论区；欢迎弟兄们加入版主之列！</description>
		<language>zh</language>
		<lastBuildDate>Fri, 03 Sep 2010 05:25:32 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.linuxsir.org/bbs/images/misc/rss.jpg</url>
			<title>LinuxSir.Org - Linux 程序设计专题讨论</title>
			<link>http://www.linuxsir.org/bbs</link>
		</image>
		<item>
			<title>opensuse 编译qsopcast时出错，哪位大侠帮我一下。</title>
			<link>http://www.linuxsir.org/bbs/showthread.php?t=371969&amp;goto=newpost</link>
			<pubDate>Fri, 03 Sep 2010 05:20:30 GMT</pubDate>
			<description>cmake -DCMAKE_BUILD_TYPE=relwithdeb ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found.
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found.
-- Found Qt-Version 4.6.3 (using /usr/bin/qmake)
-- Looking for _POSIX_TIMERS
-- Looking for _POSIX_TIMERS - found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hurriedlymatilda/qsopcast-read-only/build</description>
			<content:encoded><![CDATA[<div>cmake -DCMAKE_BUILD_TYPE=relwithdeb ..<br />
-- The C compiler identification is GNU<br />
-- The CXX compiler identification is GNU<br />
-- Check for working C compiler: /usr/bin/gcc<br />
-- Check for working C compiler: /usr/bin/gcc -- works<br />
-- Detecting C compiler ABI info<br />
-- Detecting C compiler ABI info - done<br />
-- Check for working CXX compiler: /usr/bin/c++<br />
-- Check for working CXX compiler: /usr/bin/c++ -- works<br />
-- Detecting CXX compiler ABI info<br />
-- Detecting CXX compiler ABI info - done<br />
-- Looking for Q_WS_X11<br />
-- Looking for Q_WS_X11 - found<br />
-- Looking for Q_WS_WIN<br />
-- Looking for Q_WS_WIN - not found.<br />
-- Looking for Q_WS_QWS<br />
-- Looking for Q_WS_QWS - not found.<br />
-- Looking for Q_WS_MAC<br />
-- Looking for Q_WS_MAC - not found.<br />
-- Found Qt-Version 4.6.3 (using /usr/bin/qmake)<br />
-- Looking for _POSIX_TIMERS<br />
-- Looking for _POSIX_TIMERS - found<br />
-- Configuring done<br />
-- Generating done<br />
-- Build files have been written to: /home/hurriedlymatilda/qsopcast-read-only/build</div>

]]></content:encoded>
			<category domain="http://www.linuxsir.org/bbs/forumdisplay.php?f=76">Linux 程序设计专题讨论</category>
			<dc:creator>oddhornedant</dc:creator>
			<guid isPermaLink="true">http://www.linuxsir.org/bbs/showthread.php?t=371969</guid>
		</item>
		<item>
			<title>怪事！文件系统改个名字就挂载不上了</title>
			<link>http://www.linuxsir.org/bbs/showthread.php?t=371790&amp;goto=newpost</link>
			<pubDate>Wed, 25 Aug 2010 03:22:46 GMT</pubDate>
			<description><![CDATA[问题：有一个文件系统cefs，我使用lsmod查看可以发现有这个模块
并且可以挂载mount -t cefs addr:/ /home 成功
查看df -TH 可以看到挂载上了。
现在我重新编译这个模块，并改名为bsdfs
使用rmmod cefs ，lsmod 找不到cefs这个模块
在执行insmod bsdfs，lsmod 看到 有bsdfs这个模块
那为什么在 mount -t bsdfs addr:/ /home 出现unkown filesystem type "bsdfs"这样的提示信息

请问高手们这是为什么？]]></description>
			<content:encoded><![CDATA[<div>问题：有一个文件系统cefs，我使用lsmod查看可以发现有这个模块<br />
并且可以挂载mount -t cefs addr:/ /home 成功<br />
查看df -TH 可以看到挂载上了。<br />
现在我重新编译这个模块，并改名为bsdfs<br />
使用rmmod cefs ，lsmod 找不到cefs这个模块<br />
在执行insmod bsdfs，lsmod 看到 有bsdfs这个模块<br />
那为什么在 mount -t bsdfs addr:/ /home 出现unkown filesystem type &quot;bsdfs&quot;这样的提示信息<br />
<br />
请问高手们这是为什么？</div>

]]></content:encoded>
			<category domain="http://www.linuxsir.org/bbs/forumdisplay.php?f=76">Linux 程序设计专题讨论</category>
			<dc:creator>hjwsm1989</dc:creator>
			<guid isPermaLink="true">http://www.linuxsir.org/bbs/showthread.php?t=371790</guid>
		</item>
		<item>
			<title>本人业余初学编程,碰到个简单问题,望有大虾帮助。</title>
			<link>http://www.linuxsir.org/bbs/showthread.php?t=371722&amp;goto=newpost</link>
			<pubDate>Mon, 23 Aug 2010 03:39:40 GMT</pubDate>
			<description><![CDATA[.
|-- Makefile
|-- callbacks
| |-- callbacks.c
| `-- callbacks.h
|-- gui.glade
|-- h
| `-- target.h
`-- main.c

这是我目录下的源文件摆放顺序，我将所有的头文件定义单独放在了h文件夹下，然后把所有回调函数放在了callbacks文件夹下。

以下是我的makefile

CC=gcc
SRCS=main.c callbacks/callbacks.c
PROG_NAME=main
INCS=h/target.h callbacks/callbacks.h
OBJS=${SRCS:.c=.o}
#从xx.c 文件得到 xx.o 文件
LIBS=gtk+-2.0
#----------------------------------用户修改区域 结束
CFLAGS=`pkg-config --cflags ${LIBS}` -g -Wall
#指代编译程序时使用到的一些编译选项， -g 表示生成调试信息以供GDB使用
LDFLAGS=`pkg-config --libs ${LIBS}` -g -Wall
#用来指代进行程序连接时使用到的一些选项
#-----------------------------------

all: ${PROG_NAME}
##这一句开始，Makefile就开始使用 目标:依赖 的关系来处理真正的程序编译而它们下边以 TAB 键开始的行就是满足依赖关系后要运行的程序了
${PROG_NAME}:${OBJS}
${CC} -o ${PROG_NAME} ${OBJS} ${LDFLAGS}
#注意：上边”${CC}" 的前边有一个TAB键，而不是空格

${OBJS}:${INCS}
##如果有头文件修改则自动编译源文件
.c.o:
${CC} -c $< ${CFLAGS}
#当遇到一个 .c 文件，将使用这条命令将.c文件编译为.o文件 命令中$<用来代替对应的.c 文件的文件名。（通配符？）
clean:
rm -f *.o ${PROG_NAME}
rebuild: clean all


然后编译后出现如下情况：gcc: callbacks/callbacks.o: No such file or directory


我现在一直不清除如何分开头文件和头文件相关的.c文件的摆放顺序(可能我描述这个问题也有问题),关于这个的定义部分我看一些教程也是一知半懂,我只是想把这个程序写得有条例一些,各种模块函数调用都用文件夹分类等等,但我不知道如何在makefile中组织这些关系。这个程序里的callbacks.c 在callbacks文件夹里，main.c中调用了callback.h，同样callback.h也在callbacks文件夹里。
main.c的开头是这样：
#include "h/target.h"
#include "callbacks/callbacks.h"

程序本身很简单，我把callbacks.h和callbacks.c和main.c放在同一目录下都能通过。


希望有达达明白我这个半吊子描述的问题。。。我也不知道怎么说清除了。。呵呵。。]]></description>
			<content:encoded><![CDATA[<div>.<br />
|-- Makefile<br />
|-- callbacks<br />
| |-- callbacks.c<br />
| `-- callbacks.h<br />
|-- gui.glade<br />
|-- h<br />
| `-- target.h<br />
`-- main.c<br />
<br />
这是我目录下的源文件摆放顺序，我将所有的头文件定义单独放在了h文件夹下，然后把所有回调函数放在了callbacks文件夹下。<br />
<br />
以下是我的makefile<br />
<br />
CC=gcc<br />
SRCS=main.c callbacks/callbacks.c<br />
PROG_NAME=main<br />
INCS=h/target.h callbacks/callbacks.h<br />
OBJS=${SRCS:.c=.o}<br />
#从xx.c 文件得到 xx.o 文件<br />
LIBS=gtk+-2.0<br />
#----------------------------------用户修改区域 结束<br />
CFLAGS=`pkg-config --cflags ${LIBS}` -g -Wall<br />
#指代编译程序时使用到的一些编译选项， -g 表示生成调试信息以供GDB使用<br />
LDFLAGS=`pkg-config --libs ${LIBS}` -g -Wall<br />
#用来指代进行程序连接时使用到的一些选项<br />
#-----------------------------------<br />
<br />
all: ${PROG_NAME}<br />
##这一句开始，Makefile就开始使用 目标:依赖 的关系来处理真正的程序编译而它们下边以 TAB 键开始的行就是满足依赖关系后要运行的程序了<br />
${PROG_NAME}:${OBJS}<br />
${CC} -o ${PROG_NAME} ${OBJS} ${LDFLAGS}<br />
#注意：上边”${CC}&quot; 的前边有一个TAB键，而不是空格<br />
<br />
${OBJS}:${INCS}<br />
##如果有头文件修改则自动编译源文件<br />
.c.o:<br />
${CC} -c $&lt; ${CFLAGS}<br />
#当遇到一个 .c 文件，将使用这条命令将.c文件编译为.o文件 命令中$&lt;用来代替对应的.c 文件的文件名。（通配符？）<br />
clean:<br />
rm -f *.o ${PROG_NAME}<br />
rebuild: clean all<br />
<br />
<br />
然后编译后出现如下情况：gcc: callbacks/callbacks.o: No such file or directory<br />
<br />
<br />
我现在一直不清除如何分开头文件和头文件相关的.c文件的摆放顺序(可能我描述这个问题也有问题),关于这个的定义部分我看一些教程也是一知半懂,我只是想把这个程序写得有条例一些,各种模块函数调用都用文件夹分类等等,但我不知道如何在makefile中组织这些关系。这个程序里的callbacks.c 在callbacks文件夹里，main.c中调用了callback.h，同样callback.h也在callbacks文件夹里。<br />
main.c的开头是这样：<br />
#include &quot;h/target.h&quot;<br />
#include &quot;callbacks/callbacks.h&quot;<br />
<br />
程序本身很简单，我把callbacks.h和callbacks.c和main.c放在同一目录下都能通过。<br />
<br />
<br />
希望有达达明白我这个半吊子描述的问题。。。我也不知道怎么说清除了。。呵呵。。</div>

]]></content:encoded>
			<category domain="http://www.linuxsir.org/bbs/forumdisplay.php?f=76">Linux 程序设计专题讨论</category>
			<dc:creator>formylove2</dc:creator>
			<guid isPermaLink="true">http://www.linuxsir.org/bbs/showthread.php?t=371722</guid>
		</item>
		<item>
			<title>请教: 二级指针转换为一级指针?</title>
			<link>http://www.linuxsir.org/bbs/showthread.php?t=371456&amp;goto=newpost</link>
			<pubDate>Thu, 12 Aug 2010 05:29:19 GMT</pubDate>
			<description><![CDATA[先看代码:
代码:
---------
typedef void *SMIQ;
bool smi_receive_getaddr( SMIQ *sqp, void **addr);

struct my_msg *msg;
...
smi_rcceive_getaddr(sqp, (void **)&msg);

typedef struct {
        ...
} SMIQ_FIFO;

bool smi_close_fifo(SMIQ *sqp)
{
        SMIQ_FIFO *p = (SMIQ_FIFO *)sqp;    //二级指针转换为一级指针?
...
}
---------
为什么要把二级指针转换为一级指针呢?
有什么特殊的用途?]]></description>
			<content:encoded><![CDATA[<div>先看代码:<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">代码:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left"><font color="Blue">typedef void *SMIQ;</font><br />
bool smi_receive_getaddr( SMIQ *sqp, void **addr);<br />
<br />
struct my_msg *msg;<br />
...<br />
smi_rcceive_getaddr(sqp, (void **)&amp;msg);<br />
<br />
typedef struct {<br />
&nbsp; &nbsp; &nbsp; &nbsp; ...<br />
} SMIQ_FIFO;<br />
<br />
bool smi_close_fifo(SMIQ *sqp)<br />
{<br />
&nbsp; &nbsp; &nbsp; <font color="Blue">&nbsp; SMIQ_FIFO *p = (SMIQ_FIFO *)sqp;&nbsp; &nbsp; //二级指针转换为一级指针?</font><br />
...<br />
}</code><hr />
</div>为什么要把二级指针转换为一级指针呢?<br />
有什么特殊的用途?</div>

]]></content:encoded>
			<category domain="http://www.linuxsir.org/bbs/forumdisplay.php?f=76">Linux 程序设计专题讨论</category>
			<dc:creator>叶叶叶</dc:creator>
			<guid isPermaLink="true">http://www.linuxsir.org/bbs/showthread.php?t=371456</guid>
		</item>
		<item>
			<title>谁推荐个IRC的编程频道</title>
			<link>http://www.linuxsir.org/bbs/showthread.php?t=371421&amp;goto=newpost</link>
			<pubDate>Tue, 10 Aug 2010 13:35:51 GMT</pubDate>
			<description>Linux下C编程的,</description>
			<content:encoded><![CDATA[<div>Linux下C编程的,</div>

]]></content:encoded>
			<category domain="http://www.linuxsir.org/bbs/forumdisplay.php?f=76">Linux 程序设计专题讨论</category>
			<dc:creator>叶叶叶</dc:creator>
			<guid isPermaLink="true">http://www.linuxsir.org/bbs/showthread.php?t=371421</guid>
		</item>
		<item>
			<title>定义 pthread_rwlock_t  lock; 是出错。</title>
			<link>http://www.linuxsir.org/bbs/showthread.php?t=371299&amp;goto=newpost</link>
			<pubDate>Mon, 09 Aug 2010 02:55:27 GMT</pubDate>
			<description>我用的是 readhat 9.0 是不是系统的问题啊</description>
			<content:encoded><![CDATA[<div>我用的是 readhat 9.0 是不是系统的问题啊</div>

]]></content:encoded>
			<category domain="http://www.linuxsir.org/bbs/forumdisplay.php?f=76">Linux 程序设计专题讨论</category>
			<dc:creator>farewell2010</dc:creator>
			<guid isPermaLink="true">http://www.linuxsir.org/bbs/showthread.php?t=371299</guid>
		</item>
		<item>
			<title>请教：编译后的二进行制文件到底包含什么内容</title>
			<link>http://www.linuxsir.org/bbs/showthread.php?t=371224&amp;goto=newpost</link>
			<pubDate>Fri, 06 Aug 2010 06:33:39 GMT</pubDate>
			<description>自从看了APUE后，对计算机的认识有了较大进步，知道了程序执行时的堆区，栈区等基本知识。但是，我始终不知道程序(也就是二进制代码)到底是个什么文件，它里面到底有些什么东西呢。本人非计算机专业毕业，但是想明白其中过程，请各位大侠指点一下，我应该看什么样的书，并推荐几本牛人的大作。</description>
			<content:encoded><![CDATA[<div>自从看了APUE后，对计算机的认识有了较大进步，知道了程序执行时的堆区，栈区等基本知识。但是，我始终不知道程序(也就是二进制代码)到底是个什么文件，它里面到底有些什么东西呢。本人非计算机专业毕业，但是想明白其中过程，请各位大侠指点一下，我应该看什么样的书，并推荐几本牛人的大作。</div>

]]></content:encoded>
			<category domain="http://www.linuxsir.org/bbs/forumdisplay.php?f=76">Linux 程序设计专题讨论</category>
			<dc:creator>guo333806</dc:creator>
			<guid isPermaLink="true">http://www.linuxsir.org/bbs/showthread.php?t=371224</guid>
		</item>
		<item>
			<title>请问:pthread_cond_wait函数的源代码在哪个文件夹,哪个文件,</title>
			<link>http://www.linuxsir.org/bbs/showthread.php?t=371218&amp;goto=newpost</link>
			<pubDate>Fri, 06 Aug 2010 03:50:48 GMT</pubDate>
			<description>如题,不是找头文件,
谢,</description>
			<content:encoded><![CDATA[<div>如题,不是找头文件,<br />
谢,</div>

]]></content:encoded>
			<category domain="http://www.linuxsir.org/bbs/forumdisplay.php?f=76">Linux 程序设计专题讨论</category>
			<dc:creator>叶叶叶</dc:creator>
			<guid isPermaLink="true">http://www.linuxsir.org/bbs/showthread.php?t=371218</guid>
		</item>
		<item>
			<title>进程结束时,要不要手动释放线程分配的资源?</title>
			<link>http://www.linuxsir.org/bbs/showthread.php?t=371211&amp;goto=newpost</link>
			<pubDate>Thu, 05 Aug 2010 13:24:31 GMT</pubDate>
			<description>打开的文件,
用malloc等分配的内存,
操作系统会自动释放吗?</description>
			<content:encoded><![CDATA[<div>打开的文件,<br />
用malloc等分配的内存,<br />
操作系统会自动释放吗?</div>

]]></content:encoded>
			<category domain="http://www.linuxsir.org/bbs/forumdisplay.php?f=76">Linux 程序设计专题讨论</category>
			<dc:creator>叶叶叶</dc:creator>
			<guid isPermaLink="true">http://www.linuxsir.org/bbs/showthread.php?t=371211</guid>
		</item>
		<item>
			<title>小声地问一下:Linux的说明文档是不是比较口语化?</title>
			<link>http://www.linuxsir.org/bbs/showthread.php?t=371185&amp;goto=newpost</link>
			<pubDate>Wed, 04 Aug 2010 17:15:12 GMT</pubDate>
			<description>我花了一个小时的时间看一个函数的DESCRIPTION,结果还是一知半解的,
那些技术文档是不是比较口语化呢?
我觉得很多语句写得都比较随便,
还是我的英文实在是太菜了...
怎样可以提高一下英文水平呢,
哪位前辈给我指条明路吧,

这贴绝不是水贴,写程序总得看函数说明是不是?</description>
			<content:encoded><![CDATA[<div>我花了一个小时的时间看一个函数的DESCRIPTION,结果还是一知半解的,<br />
那些技术文档是不是比较口语化呢?<br />
我觉得很多语句写得都比较随便,<br />
还是我的英文实在是太菜了...<br />
怎样可以提高一下英文水平呢,<br />
哪位前辈给我指条明路吧,<br />
<br />
这贴绝不是水贴,写程序总得看函数说明是不是?</div>

]]></content:encoded>
			<category domain="http://www.linuxsir.org/bbs/forumdisplay.php?f=76">Linux 程序设计专题讨论</category>
			<dc:creator>叶叶叶</dc:creator>
			<guid isPermaLink="true">http://www.linuxsir.org/bbs/showthread.php?t=371185</guid>
		</item>
		<item>
			<title><![CDATA[各位，遇见shell中的一个问题？${choices[@]}]]></title>
			<link>http://www.linuxsir.org/bbs/showthread.php?t=371178&amp;goto=newpost</link>
			<pubDate>Wed, 04 Aug 2010 13:04:26 GMT</pubDate>
			<description><![CDATA[${choices[@]} 其中的[@]做何解释？？？

#!/bin/bash
#
choises=(`/bin/ls *.sh 2> /dev/null`)
for choice in ${choises[@]}
do
    echo $choice
done

上面是一个简单的例子，不知道[@]的作用是什么？？]]></description>
			<content:encoded><![CDATA[<div>${choices[@]} 其中的[@]做何解释？？？<br />
<br />
#!/bin/bash<br />
#<br />
choises=(`/bin/ls *.sh 2&gt; /dev/null`)<br />
for choice in ${choises[@]}<br />
do<br />
    echo $choice<br />
done<br />
<br />
上面是一个简单的例子，不知道[@]的作用是什么？？</div>

]]></content:encoded>
			<category domain="http://www.linuxsir.org/bbs/forumdisplay.php?f=76">Linux 程序设计专题讨论</category>
			<dc:creator>zpcat</dc:creator>
			<guid isPermaLink="true">http://www.linuxsir.org/bbs/showthread.php?t=371178</guid>
		</item>
	</channel>
</rss>
