问题标签 [nethack]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
126 浏览

c - 编译 NetHack 源代码 - 应跳过的条件编译中的错误

我正在 Windows 7 上的 Visual Studio 2015 中编译 NetHack。

我收到以下错误(均以c:\program files (x86)\windows kits\10\include\10.0.10586.0\um\memoryapi.h

这是源代码中的上下文:

这很令人困惑,因为#1,有一个编译器指令应该阻止这部分代码被使用——我正在运行 Windows 7,而#2,第一个错误,missing ')' before '.'没有意义,因为.源代码中没有代码。我该如何进行?

当我搜索_WIN32_WINNTVisual Studio 的整个解决方案时,找不到它——太奇怪了!我确实找到了WINPFLAG = -DTILES -DMSWIN_GRAPHICS -DWIN32CON -D_WIN32_IE=0x0400 -D_WIN32_WINNT=0x0501。但是,_WIN32_WINNT_WIN10似乎没有定义,尽管它可能是由系统定义的(?)。尝试自己将其定义为 0x0A00,但取消注释上述代码再次产生相同的错误。

现在我得到Error C2733 'terminate': second C linkage of overloaded function not allowed NetHack nethack\include\extern.h 643

我用 Notepad++ 再次搜索了整个解决方案,这是唯一一次出现(奇怪的是,VS 本身仍然无法通过全局搜索找到这些东西)。

0 投票
0 回答
158 浏览

mingw32 - MSYS2 mingw32 shell win10 /usr/bin/sh 中的 Nethack 构建错误:-c:第 1 行:语法错误:文件意外结束

尝试在WIN10下的msys2 mingw32 shell中从github编译NETHACK克隆版本3.6.0。我完成了步骤 cd sys/winnt call nhsetup.bat cd ../../src 然后 mingw32-make -f Makefile.gcc 失败

$ mingw32-make.exe -v GNU Make 4.1.90 为 Windows32 构建

$ gcc -v gcc 版本 6.2.0(Rev2,由 MSYS2 项目构建)

任何想法是什么意思?帮助追踪它将不胜感激!