level 2
贴吧用户_atS6y1K
楼主
如题,在 MacOSX 上面编译 NetHack 3.6.7 源码(https://www.nethack.org/v367/download-src.html),根据文档(/sys/unix/install.unx),走到第六步,在 /src 下用 make 指令编译,遇到了 error:
touch ../src/config.h-t
cc -O -I../include -c monst.c
In file included from monst.c:6:
In file included from ../include/config.h:581:
In file included from ../include/global.h:9:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:68:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:309:39: error: too few arguments provided to function-like macro invocation
#if __has_attribute(warn_unused_result)
^
In file included from monst.c:6:
In file included from ../include/config.h:581:
In file included from ../include/global.h:136:
In file included from ../include/unixconf.h:320:
../include/system.h:358:12: warning: a function declaration without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
E unsigned sleep();
^
void
1 warning and 1 error generated.
make: *** [monst.o] Error 1
该怎么解决?本人 NetHack 萌新,英语又不好,可能漏看了文档的某些内容,导致编译错误。:(
求大神解决。
2023年10月15日 03点10分
1
touch ../src/config.h-t
cc -O -I../include -c monst.c
In file included from monst.c:6:
In file included from ../include/config.h:581:
In file included from ../include/global.h:9:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:68:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:309:39: error: too few arguments provided to function-like macro invocation
#if __has_attribute(warn_unused_result)
^
In file included from monst.c:6:
In file included from ../include/config.h:581:
In file included from ../include/global.h:136:
In file included from ../include/unixconf.h:320:
../include/system.h:358:12: warning: a function declaration without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
E unsigned sleep();
^
void
1 warning and 1 error generated.
make: *** [monst.o] Error 1
该怎么解决?本人 NetHack 萌新,英语又不好,可能漏看了文档的某些内容,导致编译错误。:(
求大神解决。