问题描述
我想在Microsoft的Visual Studio C ++中使用curses库。我从,然后我解压缩了该文件。但是,我在包中找不到.lib或.dll文件。没有.lib文件,我不知道如何链接我的代码在Visual Studio中的头文件在ncurses包。我需要将头文件移动到项目中的某个位置吗?
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. However, I can't find a .lib or a .dll file in the package. Without the .lib file, I don't know how to link my code in Visual Studio to the header files in the ncurses package. Do I need to move the header files to somewhere in my project?
感谢您的帮助!
推荐答案
简而言之:您希望。
你所做的并不是如何使用curses。你下载的是源代码,没有任何二进制文件 - 没有任何架构的.lib和.dll文件。不仅如此,但源代码不能直接编译 - 如果你已经将它添加到C / C ++项目,即使在Unix框上,它也不能编译。
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.
为了编译,curses需要一个 configure
脚本运行,生成一些文件,可能 config.h
,也许其他源文件和makefile。
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.
唉,所有这一切都是一个问题,因为curses是AFAIK一个Unix库,存在Unix API。任何Windows端口是完全独立的努力。
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.
另请参见。
这篇关于将curses库添加到Visual Studio C ++?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!