简体   繁体   English

PDCurses 不会在 Windows 上编译

[英]PDCurses wont compile on windows

I am trying to compile PDCurses, but when it attempts to compile pdcscrn.c it gives the error message我正在尝试编译 PDCurses,但是当它尝试编译 pdcscrn.c 时,它给出了错误消息

../wincon/pdcscrn.c:93:5: error: unknown type name 'PCONSOLE_SCREEN_BUFFER_INFOEX'; did you mean 'PCONSOLE_SCREEN_BUFFER_INFO'?
     PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     PCONSOLE_SCREEN_BUFFER_INFO
../wincon/pdcscrn.c:95:5: error: unknown type name 'PCONSOLE_SCREEN_BUFFER_INFOEX'; did you mean 'PCONSOLE_SCREEN_BUFFER_INFO'?
     PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     PCONSOLE_SCREEN_BUFFER_INFO
../wincon/pdcscrn.c:97:8: error: unknown type name 'SetConsoleScreenBufferInfoExFn'
 static SetConsoleScreenBufferInfoExFn pSetConsoleScreenBufferInfoEx = NULL;

and there are also a lot more lines, but that is the first part.还有更多的行,但这是第一部分。 I am using GCC 8.2.0, and I compiling the wincon directory because I am on windows 10. Thanks.我正在使用 GCC 8.2.0,并且我编译了 wincon 目录,因为我使用的是 Windows 10。谢谢。

This is addressed in wincon/README.md:这在 wincon/README.md 中得到解决:

  • If your build stops with errors about PCONSOLE_SCREEN_BUFFER_INFOEX, add the parameter "INFOEX=N" to your make command line and try again.如果您的构建因有关 PCONSOLE_SCREEN_BUFFER_INFOEX 的错误而停止,请将参数“INFOEX=N”添加到您的 make 命令行并重试。 (This will happen with older compile environments.) (这将发生在较旧的编译环境中。)

BTW, you should specify the exact toolset you're using, since AFAIK there's no such thing as raw GCC for Windows -- it'll be something like MinGW or Cygwin.顺便说一句,您应该指定您正在使用的确切工具集,因为 AFAIK 没有用于 Windows 的原始 GCC 这样的东西——它会像 MinGW 或 Cygwin 这样的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM