QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

楼主: wsm

求助 斑竹帮我移到开发区

[复制链接]
 楼主| 发表于 2005-5-27 17:05:23 | 显示全部楼层
几个问题
1 自己懒了 这个问题最大
2 thread不行
3 多国编码支持
4 核心优化
5 测试和调试
回复

使用道具 举报

 楼主| 发表于 2005-5-31 10:25:54 | 显示全部楼层
看来是很难这样子找到好人了
我周末整理了一下代码 好歹能够稍微好看一些 上传到了公社的软件区 名字就叫GTKT
这是一个基于gtk的X下的bt客户端 意图很简单 现在我不知道有那个linux下的bt客户端可以让我满意的 (如果哪位知道 就告诉我吧 我也好省力了)
不过GTKT不是GTK Torrent 其实是GTK Test
这是我写的第一个GTK的代码 也是第一个linux下有x界面的代码 所以很多东西开始做的时候都不知道 比方说用libglade可以好看些之类的 (当然是不是依赖于libglade就好还是问题) 代码需要改进的地方很多 不过相比起来还是让它能够跑起来更好
现在主要的问题就是上面贴子里列出来的这些
希望代码本身能够激起一些人的兴趣
回复

使用道具 举报

 楼主| 发表于 2005-5-31 10:35:19 | 显示全部楼层
介绍一下代码
main callback interface support这些都是gtk界面代码
inifile是读写配置文件 由于是我以前在win下面的代码 所以连名字到格式都是ini的样子
torrentmanager btcore是中间结合层
其余的都是实现bt协议的代码 大段大段的修改自ctorrent的东西 很容易看出和我的风格差很多 其实ct的代码极烂 改了一些地方很费力
本想从头写 不过暂时想先搞一个能跑的就好
修改这里是我现在主要在做的事情 不过平时事情多 不好说能花上多少时间
有兴趣的可以给我邮件 [email protected]
回复

使用道具 举报

发表于 2005-6-1 10:30:44 | 显示全部楼层
无法编译。有一些变量声明没有extern。
回复

使用道具 举报

 楼主| 发表于 2005-6-1 10:39:32 | 显示全部楼层
应该可以编译通过的。是哪个? 写一下我好改掉。
回复

使用道具 举报

发表于 2005-6-1 13:17:12 | 显示全部楼层
[code:1] In file included from bencode.c:3:
def.h:4:22: ./config.h: No such file or directory
In file included from bitfield.h:4,
                 from bitfield.c:1:
def.h:4:22: ./config.h: No such file or directory
In file included from btcontent.h:4,
                 from btcontent.c:1:
def.h:4:22: ./config.h: No such file or directory
In file included from btcore.c:1:
def.h:4:22: ./config.h: No such file or directory
btcore.c:20:22: ./config.h: No such file or directory
In file included from btfiles.h:5,
                 from btfiles.c:1:
def.h:4:22: ./config.h: No such file or directory
In file included from btcontent.h:4,
                 from btrequest.h:4,
                 from btrequest.c:3:
def.h:4:22: ./config.h: No such file or directory
In file included from btstream.h:4,
                 from btstream.c:2:
def.h:4:22: ./config.h: No such file or directory
In file included from bufio.h:4,
                 from bufio.c:1:
def.h:4:22: ./config.h: No such file or directory
In file included from TorrentManager.h:4,
                 from callbacks.c:10:
def.h:4:22: ./config.h: No such file or directory
callbacks.c: In function `on_OF_ok_button_clicked':
callbacks.c:144: warning: passing arg 1 of `g_free' discards qualifiers from pointer target type
In file included from connect_nonb.h:4,
                 from connect_nonb.c:3:
def.h:4:22: ./config.h: No such file or directory
In file included from peerlist.h:4,
                 from downloader.c:12:
def.h:4:22: ./config.h: No such file or directory
In file included from httpencode.c:1:
def.h:4:22: ./config.h: No such file or directory
httpencode.c:8:22: ./config.h: No such file or directory
inifile.c: In function `ini_file_write_file':
inifile.c:136: warning: passing arg 2 of `fopen' makes pointer from integer without a cast
inifile.c:154: warning: passing arg 2 of `fprintf' makes pointer from integer without a cast
In file included from iplist.h:4,
                 from iplist.c:3:
def.h:4:22: ./config.h: No such file or directory
main.c:7:22: config.h: No such file or directory
main.c:15:28: torrentmanager.h: No such file or directory
main.c: In function `main':
main.c:36: error: `Configure_filepath' undeclared (first use in this function)
main.c:36: error: (Each undeclared identifier is reported only once
main.c:36: error: for each function it appears in.)
In file included from peer.h:4,
                 from peer.c:1:
def.h:4:22: ./config.h: No such file or directory
In file included from peerlist.h:4,
                 from peerlist.c:1:
def.h:4:22: ./config.h: No such file or directory
In file included from rate.h:5,
                 from rate.c:1:
def.h:4:22: ./config.h: No such file or directory
In file included from setnonblock.h:4,
                 from setnonblock.c:1:
def.h:4:22: ./config.h: No such file or directory
In file included from TorrentManager.h:4,
                 from TorrentManager.c:5:
def.h:4:22: ./config.h: No such file or directory
TorrentManager.c: In function `TorrentManager_load_torrent':
TorrentManager.c:105: warning: passing arg 2 of `btcore_init_from_torrent' discards qualifiers from pointer target type
TorrentManager.c:105: warning: passing arg 3 of `btcore_init_from_torrent' discards qualifiers from pointer target type
TorrentManager.c: In function `TorrentManager_load_metafile':
TorrentManager.c:152: warning: passing arg 4 of `ini_file_read_int' from incompatible pointer type
TorrentManager.c:157: warning: passing arg 4 of `ini_file_read_array' from incompatible pointer type
TorrentManager.c:162: error: `arg_flg_force_check' undeclared (first use in this function)
TorrentManager.c:162: error: (Each undeclared identifier is reported only once
TorrentManager.c:162: error: for each function it appears in.)
TorrentManager.c: In function `TorrentManager_start_download':
TorrentManager.c:266: warning: passing arg 1 of `g_thread_create_full' from incompatible pointer type
TorrentManager.c: In function `TorrentManager_stop_download':
TorrentManager.c:281: error: `Meta_filepath' undeclared (first use in this function)
In file included from tracker.h:4,
                 from tracker.c:1:
def.h:4:22: ./config.h: No such file or directory
[/code:1]
回复

使用道具 举报

 楼主| 发表于 2005-6-1 13:35:56 | 显示全部楼层
config.h 是autoconfig生成的
其它Configure_filepath 和 arg_force_check 都还在整理中
回复

使用道具 举报

发表于 2005-6-7 15:18:30 | 显示全部楼层
你的线程问题解决了?好像glibc2.3.4与2.6.8.1以上的内核线程有冲突。
回复

使用道具 举报

 楼主| 发表于 2005-6-7 15:48:49 | 显示全部楼层
现在线程可以跑 但是停不下来   还在测试中
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-11-5 21:45 , Processed in 0.045061 second(s), 14 queries .

© 2021 Powered by Discuz! X3.5.

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