是不是数组越界了??
我把secname[SECNUM][2][20] 改成secname[SECNUM][2][3]还是不行,怎么回事情?
我是按如下修改的:
const char seccode[SECNUM][5] = {"a", "b", "c"};
这个是分区代号,部分统计程序需要用到。
const char * const explain[] = {
"本站系统",
"人在美国",
"大话西游",
NULL
};
分类讨论区的区名,web 下的站点管理会用到。最后的 NULL 不能漏!
const char * const groups[] = {
"GROUP_0",
"GROUP_1",
"GROUP_2",
NULL
};
精华区总目录下相应分区的目录名,开版和修改版面设定的时候会用到。
最后的 NULL 不能漏!
const char secname[SECNUM][2][20] = {
{"本站系统", "[本站]"},
{"人在美国", "[校园][创业]"},
{"大话西游", "[留学][学校][团体]"},
};
MAKE的时候却出现了
maintain.o(.text+0xd9c): In function `chgrp':
: undefined reference to `secname'
maintain.o(.text+0xdaa): In function `chgrp':
: undefined reference to `groups'
maintain.o(.text+0xdb9): In function `chgrp':
: undefined reference to `groups'
maintain.o(.text+0xdcb): In function `chgrp':
: undefined reference to `secname'
maintain.o(.text+0xe80): In function `chgrp':
: undefined reference to `secname'
maintain.o(.text+0xe9d): In function `chgrp':
: undefined reference to `groups'
maintain.o(.text+0x2f28): In function `check_ann':
: undefined reference to `groups'
maintain.o(.text+0x2f44): In function `check_ann':
: undefined reference to `groups'
maintain.o(.text+0x2f69): In function `check_ann':
: undefined reference to `groups'
maintain.o(.text+0x31f0): In function `select_group':
: undefined reference to `groups'
maintain.o(.text+0x3205): In function `select_group':
: undefined reference to `secname'
maintain.o(.text+0x334f): In function `select_group':
: undefined reference to `groups'
maintain.o(.text+0x3361): In function `select_group':
: undefined reference to `secname'
maintain.o(.text+0x51c4): In function `new_m_editbrd':
: undefined reference to `groups'
maintain.o(.text+0x67a5): In function `new_m_editbrd':
: undefined reference to `groups'
announce.o(.text+0x5a53): In function `add_group':
: undefined reference to `groups'
announce.o(.text+0x5a71): In function `add_group':
: undefined reference to `groups'
announce.o(.text+0x5ac8): In function `add_group':
: undefined reference to `groups'
announce.o(.text+0x5ae4): In function `add_group':
: undefined reference to `secname'
collect2: ld returned 1 exit status
make[2]: *** [bbsd] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
--
修改:rainboyfdy FROM 221.6.29.*
FROM 221.6.29.*