Files
PDCurses_demo/PDcursesDemo.cpp
2019-11-12 22:46:56 +01:00

41 lines
1.6 KiB
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include <iostream>
#include <curses.h>
int main()
{
initscr();
printw("czesc bartus");
refresh();
getch();
endwin();
return 0;
}
/*
Take the developer command prompt of VS2017 community edition and type in set PDCURSES_SRCDIR=<PDCurses Directory Location>; in my case it was
set PDCURSES_SRCDIR=C:\pdcurses-master
Note: Here we are setting up the environment variable needed for compilation. If you need additional functionality defined by the pdcurses library, you may want to set corresponding variables in this step. For example, if you need wide character support, you can use set WIDE=1. To see what all are the options available, you can open up the make file (mentioned in next step) in any text editor and look for if conditionals.
Navigate in the command window to the directory of PDcurses/win32 (in my case C:\pdcurses-master\win32)
nmake f vcwin32.mak
(This is the make file for pd curses.) It will create the pdcurses.lib for our Visual Studio.
Now we need to incorporate the generated library into our project. So open up your project and go to project properties
In “VC++ Directories”, change:
Include directories: Add a new file-path to PDCurses installation directory, in my case it is C:\pdcurses-master.
Library directories: Add a new file-path to PDCurses installation library directory, in my case it is C:\pdcurses-master\win32.
In C/C++:
In “Code Generation” tab, change “Runtime Library” to “Multithreaded Debug (/MTd)”. (Usually, it is set already)
In Linker:
In “Input” tab, add pdcurses.lib to Additional Dependencies (I initially got confused - remeber, it is the input tab of linker)
Click on Apply, and OK.
*/