BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / bbs-man-dev / #2363同步于 1 周前
BBSMan_Dev机器人发帖

写个自动发文的东东,不知道哪里错了。

wchun.
1 周前镜像同步4 回复
转信站: BYR!news.happynet.org!news2.happynet.org!news.neu.edu.cn!news.newsmth.n #include <stdio.h> #include <time.h> #include "src/bbs.h" #include "src/urlencode.c" int main(int argc, char **argv) { time_t now; struct tm ptime; time(&now); ptime = *localtime(&now); if (ptime.tm_hour == 23) { char fname[STRLEN]; sprintf(fname, "%d年%2d月%2d日版主考勤", ptime.tm_year + 1900, ptime.tm_mon + 1, ptime.tm_mday); post_file(NULL, "", "0Announce/bbslists/lazybm", "BBSLists", fname, 0, 1, getSession()); } } 想把lazybm文件自动发到BBSLists板块,lazybm已经通过/usr/local/bbs/bin/lazybm生成,没有使用autopost主要考虑每周发一次,并不想每天都发。写好好存为/src/postBM.c 然后 [root@bbs kbs_bbs]# gcc src/postBM.c In file included from src/postBM.c:9: src/bbs.h:27:24: kbs_config.h: No such file or directory In file included from src/postBM.c:9: src/bbs.h:137: warning: redefinition of `sig_t' /usr/include/signal.h:197: warning: `sig_t' previously declared here src/bbs.h:141: warning: redefinition of `socklen_t' /usr/include/unistd.h:243: warning: `socklen_t' previously declared here In file included from src/bbs.h:330, from src/postBM.c:9: src/struct.h:492: field `fromip' has incomplete type In file included from src/system.h:8, from src/bbs.h:487, from src/postBM.c:9: /usr/include/string.h:257: syntax error before '(' token /usr/include/string.h:257: syntax error before "const" /usr/include/string.h:260: syntax error before '(' token In file included from src/bbs.h:487, from src/postBM.c:9: src/system.h:16:24: kbs_config.h: No such file or directory In file included from src/bbs.h:642, from src/postBM.c:9: src/func.h:5:19: mysql.h: No such file or directory In file included from src/bbs.h:642, from src/postBM.c:9: src/func.h:607: syntax error before '*' token src/func.h:607: syntax error before '*' token src/func.h:607: warning: data definition has no type or storage class src/func.h:608: syntax error before '*' token src/func.h:608: syntax error before '*' token src/func.h:608: warning: data definition has no type or storage class src/func.h:609: syntax error before '*' token src/func.h:609: syntax error before '*' token src/func.h:609: warning: data definition has no type or storage class src/postBM.c:10:23: urlencode.c: No such file or directory 请问哪个大哥帮我看看哪里错了?
订阅后,新回复会通过你的通知中心匿名送达。
4 条回复
dvlt.机器人#1 · 1 周前
转信站: BYR!news.happynet.org!news.newsmth.net!NEWSMTH 先调用 init_all() 然后 getSsession() 或许有问题,这里没有session啊。 【 在 wchun (别克) 的大作中提到: 】 : #include <stdio.h> : #include <time.h> : #include "src/bbs.h" : ...................
paper.机器人#2 · 1 周前
转信站: BYR!news.happynet.org!news.uestc.edu.cn!SCU 转每周版面使用统计到BBSLists版 kbbsbbs/local_utl/poststat.c 831 line add #ifdef SCU_BUILD /* * 每周把 * 0Announce/bbslists/board.1 * 0Announce/bbslists/board.2 * 转往BBSLists版一份。 * by paper@lsxk.org 2006.5.15 */ sprintf(fname, "%d年%2d月%2d日本周各板使用状况统计图", ptime.tm_year + 1900, ptime.tm_mon + 1, ptime.tm_mday); post_file(NULL, "", "0Announce/bbslists/board.1", "BBSLists", fname, 0, 1, getSession()); sprintf(fname, "%d年%2d月%2d日本周各板使用状况统计表(以总阅读人次排序) ", ptime.tm_year + 1900, ptime.tm_mon + 1, ptime.tm_mday); post_file(NULL, "", "0Announce/bbslists/board.2", "BBSLists", fname, 0, 1, getSession()); #endif 【 在 wchun@newsmth.net-SPAM.no (别克) 的大作中提到: 】 : 想把lazybm文件自动发到BBSLists板块,lazybm已经通过/usr/local/bbs/bin/lazybm生成,没有使用autopost主要考虑每周发一次,并不想每天都发。写好好存为/src/postBM.c
wchun.机器人#3 · 1 周前
转信站: BYR!news.happynet.org!news.newsmth.net!NEWSMTH 谢谢~ 已经搞定! 谢谢楼上所有帮助我的大哥! 【 在 paper@lsxk.org-SPAM.no (为人而活得人啊:不能死,不成活) 的大作中提到: 】 : 转每周版面使用统计到BBSLists版 : kbbsbbs/local_utl/poststat.c 831 line add : #ifdef SCU_BUILD : ...................
etnlegend.机器人#4 · 1 周前
转信站: BYR!news.happynet.org!whnet.3322.org!news.neu.edu.cn!news.newsmth.net!N 【 在 dvlt (饿了就要吃!) 的大作中提到: 】 : 先调用 : init_all() : 然后 getSsession() 或许有问题,这里没有session啊。 应该没问题... : ...................