CnPack Forum


 
Subject: 编译cvstrac中文版需要准备的环境?
jjcvs
新警察
Rank: 1



UID 2114
Digest Posts 0
Credits 2
Posts 2
点点分 2
Reading Access 10
Registered 2006-4-19
Status Offline
Post at 2006-4-19 09:59  Profile | Blog | P.M. 
编译cvstrac中文版需要准备的环境?

我在Federa下编译cvstrac中文版,出现如下的问题:
......
gcc -g -O0 -Wall  -I. -I/home/regical/temp/tmp/cvstrac -o rss.o -c rss_.c
rss_.c: In function `common_rss_header':
rss_.c:43: parse error before `char'
rss_.c:52: `charset' undeclared (first use in this function)
rss_.c:52: (Each undeclared identifier is reported only once
rss_.c:52: for each function it appears in.)
make: *** [rss.o] 错误 1

请问是否是由于没有装一些环境引起的,谢谢!

[ Last edited by jjcvs on 2006-4-19 at 11:52 ]
Top
jjcvs
新警察
Rank: 1



UID 2114
Digest Posts 0
Credits 2
Posts 2
点点分 2
Reading Access 10
Registered 2006-4-19
Status Offline
Post at 2006-4-19 12:26  Profile | Blog | P.M. 
解决了,但是还不知道为什么,

将rss.c开始的方法common_rss_header修改成如下的样子就可以通过了:
static void common_rss_header(char *zTitle, char *zDescription, int nBuildDate){
  int nTTL = atoi(db_config("rss_ttl", "60"));

#if CVSTRAC_I18N
  char * charsetpp = db_config("charset",nl_langinfo(CODESET));
#else
  char * charset = db_config("charset","GB2312");
#endif

  cgi_set_content_type("text/xml");

  @ <?xml version="1.0" encoding="%h(charset)"?>
  @ <rss version="2.0">
  @ <channel>
  @ <title>%h(g.zName) - %h(zTitle)</title>
  @ <link>%s(g.zBaseURL)/timeline</link>
  @ <description>%h(zDescription)</description>
  @ <language>zh-cn</language>
  @ <pubDate>%h(cgi_rfc822_datestamp( time(0) ))</pubDate>
  if( nBuildDate>0 ){
    const char* zBD = cgi_rfc822_datestamp(nBuildDate);
    @ <lastBuildDate>%h(zBD)</lastBuildDate>
    cgi_append_header(mprintf("Last-Modified: %h\r\n",zBD));
  }
  @ <generator>CVSTrac @VERSION@ 中文版</generator>
  @ <ttl>%d(nTTL)</ttl>
}
Top
 




All times are GMT++8, the time now is 2022-1-21 13:38

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.010819 second(s), 7 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP