Add curses library to Visual Studio C++?

前端 未结 1 343
情深已故
情深已故 2021-01-20 20:36

I\'m trying to use the curses library on Microsoft\'s Visual Studio C++. I downloaded ncurses-5.9.tar.gz from http://www.gnu.org/software/ncurses/, and I unzipped the file.

相关标签:
1条回答
  • 2021-01-20 21:24

    In a nutshell: you want Bill Gray's PDCurses. That fork is quite active. The "original" implementation is in Bill McBrine's repo, with some activity going on. The two projects seem sadly to have diverged, though. The former has implemented a native Win32a GDI terminal window, while the latter only supports the native Windows console.

    What you did is not how to use curses at all. What you have downloaded is source code, there are no binaries there at all - no .lib nor .dll files for any architecture. Not only that, but the source code can't be directly compiled either -- if you'd have added it to a C/C++ project, even on a Unix box, it wouldn't compile.

    In order to compile, curses needs to have a configure script run, that generates some files, probably config.h, perhaps other source files, and makefiles.

    Alas, all that is a moot point because curses is AFAIK a Unix library that really depends on Unix APIs being present. Any Windows ports are completely separate efforts.

    See also Is ncurses available for windows?.

    0 讨论(0)
提交回复
热议问题