#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
请问哪个大哥帮我看看哪里错了?
--
FROM 222.172.221.*