在 2000 年代初期,我使用这个代码库来运行一个泥浆,并通过它自学一些非常基本的编码。
我刚刚从在我之前运行服务器的管理员/编码员那里获得了一份代码库副本,我几乎可以肯定它当时会按原样编译,但现在不会。
我唯一的猜测是它与过去 15 到 20 年对 GCC 的更新有关,但我承认我是一个新手,而且我在这里很不了解。
这是我在尝试使用 make 编译它时收到大约一百页警告后得到的错误:
[18:24:54] finger.c ...
In file included from finger.c:10:0:
../src/include/merc.h:5149:13: warning: inline function ‘check_toughness’ declared but never defined
inline int check_toughness args( ( CD *ch, CD *victim, int dam));
^~~~~~~~~~~~~~~
[18:24:54] Linking Executable ...
obj/fight.o: In function `group_gain':
tbw/reloaded/src/fight.c:5514: undefined reference to `xp_compute'
tbw/reloaded/src/fight.c:5516: undefined reference to `xp_compute'
tbw/reloaded/src/fight.c:5518: undefined reference to `xp_compute'
obj/fight.o: In function `one_hit':
tbw/reloaded/src/fight.c:2457: undefined reference to `check_toughness'
obj/mage.o: In function `do_chant':
tbw/reloaded/src/mage.c:345: undefined reference to `check_toughness'
tbw/reloaded/src/mage.c:361: undefined reference to `check_toughness'
tbw/reloaded/src/mage.c:377: undefined reference to `check_toughness'
tbw/reloaded/src/mage.c:393: undefined reference to `check_toughness'
obj/mage.o:tbw/reloaded/src/mage.c:409: more undefined references to `check_toughness' follow
obj/update.o: In function `mobile_update':
tbw/reloaded/src/update.c:756: undefined reference to `werewolf_regen'
obj/powerl.o: In function `do_planarstorm':
tbw/reloaded/src/powerl.c:680: undefined reference to `check_toughness'
collect2: error: ld returned 1 exit status
Makefile:27: recipe for target '../src/reloaded' failed
make: *** [../src/reloaded] Error 1
代码库和引用的文件很大,所以我认为现在附加它们是没有意义的,但如果需要,我绝对可以提供它们。
作为记录,像“check_toughness”和“xp_compute”这样的函数肯定是在几千行代码之后在这些文件中定义的。
如有任何建议,将不胜感激,谢谢!