How to use the CDK library for PdCurses in CodeBlocks?

若如初见. 提交于 2019-12-12 05:19:54

问题


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.

I just want to ask on how could I install the CDK library for PDCurses, since it was originally for Ncurses.

Thanks!!


回答1:


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:

  1. Download the CDK source package
  2. Run MSYS console and do `configure; make' in the source root
  3. Copy the resulting libcdk.a file and the header files to somewhere nice that your compiler and/or IDE can find them.
  4. Copy the manpages somewhere nice (I personally use the Cygwin man command under Windows).
  5. Compile one of the test programs, e.g. 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



来源:https://stackoverflow.com/questions/9666090/how-to-use-the-cdk-library-for-pdcurses-in-codeblocks

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!