如何在 CodeBlocks 中为 PdCurses 使用 CDK 库? [英] How to use the CDK library for PdCurses in CodeBlocks?
问题描述
我已经在 CodeBlocks 中成功安装并使用了 PdCurses.现在,当我试图完成 Ncurses 教程时,我已经阅读了最后部分说有一个实用程序库,它是 CDK,它将通过提供预制的对话框控制台来帮助使 Curses 应用程序更容易.
I've successfully installed and used PdCurses in CodeBlocks. Now, as I am trying to finish the Ncurses tutorial, I've read the last part said that there is a utility library which is the CDK that will help make curses apps easier by providing pr-emade dialog console boxes.
我只是想问我如何为 PDCurses 安装 CDK 库,因为它最初是用于 Ncurses.
I just want to ask on how could I install the CDK library for PDCurses, since it was originally for Ncurses.
谢谢!!
推荐答案
CDK 与 PDCurses 和 MinGW 配合良好.既然你提到了 CodeBlocks,我猜这就是你正在使用的.在这种环境下编译没有什么特别的步骤:
CDK works fine with PDCurses and MinGW. Since you mentioned CodeBlocks I'm guessing that's what you're using. There are no special steps to compile it in this environment:
- 下载 CDK 源包
- 运行 MSYS 控制台并执行 `configure;make' 在源根目录中
- 将生成的 libcdk.a 文件和头文件复制到编译器和/或 IDE 可以找到它们的合适位置.
- 将手册页复制到合适的地方(我个人在 Windows 下使用 Cygwin man 命令).
- 编译其中一个测试程序,例如buttonbox_ex.c
作为参考,我使用此命令编译了其中一个示例以验证库是否正常工作:
For reference I used this command to compile one of the examples to verify the library is working:
gcc -Wall -o buttonbox_ex buttonbox_ex.c -lcdk -lpdcurses
gcc -Wall -o buttonbox_ex buttonbox_ex.c -lcdk -lpdcurses
这篇关于如何在 CodeBlocks 中为 PdCurses 使用 CDK 库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!