commit 9136d0f983a0cfb7be5f1b9e15cd5a83ed7eaa31 Author: bartool Date: Tue Nov 12 22:46:56 2019 +0100 Working demo of PDcursers diff --git a/PDcursesDemo.cpp b/PDcursesDemo.cpp new file mode 100644 index 0000000..8b087cd --- /dev/null +++ b/PDcursesDemo.cpp @@ -0,0 +1,41 @@ +#include +#include + +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=; 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. + +*/ \ No newline at end of file diff --git a/PDcursesDemo.sln b/PDcursesDemo.sln new file mode 100644 index 0000000..2f80598 --- /dev/null +++ b/PDcursesDemo.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29503.13 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PDcursesDemo", "PDcursesDemo.vcxproj", "{F8EC13A0-BC0A-446D-998E-B1B69344258D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F8EC13A0-BC0A-446D-998E-B1B69344258D}.Debug|x64.ActiveCfg = Debug|x64 + {F8EC13A0-BC0A-446D-998E-B1B69344258D}.Debug|x64.Build.0 = Debug|x64 + {F8EC13A0-BC0A-446D-998E-B1B69344258D}.Debug|x86.ActiveCfg = Debug|Win32 + {F8EC13A0-BC0A-446D-998E-B1B69344258D}.Debug|x86.Build.0 = Debug|Win32 + {F8EC13A0-BC0A-446D-998E-B1B69344258D}.Release|x64.ActiveCfg = Release|x64 + {F8EC13A0-BC0A-446D-998E-B1B69344258D}.Release|x64.Build.0 = Release|x64 + {F8EC13A0-BC0A-446D-998E-B1B69344258D}.Release|x86.ActiveCfg = Release|Win32 + {F8EC13A0-BC0A-446D-998E-B1B69344258D}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {CDB99B28-877B-463F-9D4B-436320377F74} + EndGlobalSection +EndGlobal diff --git a/PDcursesDemo.vcxproj b/PDcursesDemo.vcxproj new file mode 100644 index 0000000..32347fc --- /dev/null +++ b/PDcursesDemo.vcxproj @@ -0,0 +1,162 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + {F8EC13A0-BC0A-446D-998E-B1B69344258D} + Win32Proj + PDcursesDemo + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + C:\MinGW\include\PDCurses-3.9;$(IncludePath) + C:\MinGW\include\PDCurses-3.9\wincon;$(LibraryPath) + + + true + + + false + + + false + + + + + + Level3 + Disabled + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + pdcurses.lib;%(AdditionalDependencies) + + + + + + + Level3 + Disabled + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + + + Level3 + MaxSpeed + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + Level3 + MaxSpeed + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/PDcursesDemo.vcxproj.filters b/PDcursesDemo.vcxproj.filters new file mode 100644 index 0000000..3809eee --- /dev/null +++ b/PDcursesDemo.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file