Created
December 4, 2022 17:27
-
-
Save flexits/7a2e49eda8d21e5c4f5c6c5fa00abd69 to your computer and use it in GitHub Desktop.
Using PDCurses library with CodeBlocks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Download last stable release (link on https://pdcurses.org/) | |
and extract somewhere (D:\pdcurses). | |
2. Locate MinGW directory (C:\Program Files\CodeBlocks\MinGW\bin) | |
3. Run console window: | |
SET PATH=%PATH%;C:\Program Files\CodeBlocks\MinGW\bin | |
cd /d D:\pdcurses\wincon | |
make -f Makefile DLL=Y | |
4. Copy curses.h and panel.h to the current Code::Blocks project folder, | |
as well as pdcurses.a and pdcurses.dll. Rename pdcurses.a to libpdcurses.a | |
Add headers by right-clicking the project -> Add files. | |
Add lib and dll: | |
- Right click on the project then select Build options | |
- Select the directories tab | |
- Add the required paths for compiler and linker (project directory) | |
- Add your specific libraries in the linker tab. | |
5. Test. Try to compile this one: | |
#include "curses.h" | |
int main() | |
{ | |
initscr(); | |
wclear(stdscr); | |
printw("hello world\n"); | |
wrefresh(stdscr); | |
system("pause"); | |
endwin(); | |
} | |
https://stackoverflow.com/questions/9301211/how-do-i-install-pdcurses-in-windows-for-use-with-c | |
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_I_would_like_to_compile_a_project_using_some_non-standard_libraries._How_can_I_indicate_to_CodeBlocks_that_these_libraries_and_include_files_exist.3F | |
https://cects.com/adding-pdcurses-to-mingw/ | |
https://pdcurses.org/docs/USERS.html | |
https://pdcurses.org/docs/MANUAL.html | |
https://www.ibm.com/docs/en/aix/7.2?topic=concepts-curses-library | |
https://www.sbarjatiya.com/notes_wiki/index.php/Using_ncurses_library_with_C | |
https://docs.python.org/3/library/curses.html | |
https://code-live.ru/post/cpp-ncurses-hello-world/ | |
https://tldp.org/HOWTO/NCURSES-Programming-HOWTO/ | |
https://stackoverflow.com/questions/29370377/scrolling-in-c-with-ncurses-pad | |
https://techlister.com/linux/creating-menu-with-ncurses-in-c/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment