问题
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:
- Download the CDK source package
- Run MSYS console and do `configure; make' in the source root
- Copy the resulting libcdk.a file and the header files to somewhere nice that your compiler and/or IDE can find them.
- Copy the manpages somewhere nice (I personally use the Cygwin man command under Windows).
- 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