How to download, build and include PDCurses in Visual Studio 2019 for C++ on Windows

只谈情不闲聊 提交于 2021-02-11 15:14:24

问题


I'm fairly new to C/C++ but have never tried to include external libraries before in my projects as I've mostly been doing tutorials and such. These have been mostly console applications/games. When I was looking for an alternative to the "evil" system(" ") commands I was pointed to Curses.

Now I've gone to the GitHub for both branches of the PDCurses source library (wmcbrine's branch and Bill-Gray's Branch) but every time I try to build library it returns multiple errors (happy to provide a image of the errors if need be).

The biggest issue is that the documentation is a little difficult to understand for an absolute beginner and most tutorials are extremely outdated. I was hoping that someone know's of a relevant tutorial on how to get PDCurses up and running on windows (for C++) or could explain how to do it on here.


回答1:


So, I have figured out how to get PDCurses compiled using it's Makefiles (Makefile.vc specifically) and such.

To anyone who may have issue doing this in future, make sure to read the README.md file very slowly and carefully. From a beginners perspective it was a bit vague but it does contain all the information needed it in it, it should just be read a few time 😅.

It also should be noted that when compiling the library into a .dll for Visual Studio 2019 using the nmake function, you have to run the command in the x86/x64 Native Tools Command Prompt. Which one you use will depend on the architecture you plan to build your project in. If your not sure where to find it, open you start menu>all apps>scroll down to the folder "Visual Studio 2019" and they all should be in there.

Run the "nmake" command in this shell configures a .bat file which optimises for x86 or x64 architecture respectively. Hopefully this helps anyone who might ask this (or a similar) question.



来源:https://stackoverflow.com/questions/63553274/how-to-download-build-and-include-pdcurses-in-visual-studio-2019-for-c-on-win

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