-
Notifications
You must be signed in to change notification settings - Fork 0
Building
Kevin Zhang edited this page Apr 21, 2017
·
4 revisions
Building should be more or less the same for most systems, due to CMake; Windows is a bit of a pain depending on how your environment is set up.
I highly recommend installing Babun; while it's not perfect, it's certainly an upgrade from a raw Cygwin installation. From there, you should be able to run pact install ncurses cmake and have things build fine. There are a couple caveats to this, however -
- If you have already installed CMake - especially the Windows binary for it outside of Cygwin, which is most likely the better choice if you have other plans for Windows development - then it won't be able to find the ncurses shared library
libncurses.a. You need to add-D CURSES_LIBRARY=/path/to/libncurses.ato help it find the library. For Cygwin, this is most likely/usr/lib/libncurses.a. Alternatively, specify the Cygwin CMake package - this seems to play better with the Cygwin ncurses lib, and should build and run correctly if all else is set. - You may have to also include
-D CURSES_INCLUDE_PATH=/path/to/ncursesif it can't locate the header files for ncurses. This seems to be a wishy-washy subject when it comes to Visual Studio, and it's possible that Visual Studio simply doesn't like working with Cygwin ncurses. - If you want to switch from Visual Studio to a different build system or vice-versa, add
-G <your-build-system>. You can find it from the output ofcmake --help, though Cygwin CMake has issues identifying Visual Studio. If your CMake doesn't correctly identify the location of your Visual Studiold, you may want to uninstall the Cygwin version and install the Windows binaries instead and put it in yourPATH. - Visual Studio may require PDCurses to include the correct
ncurses.hfile. - Ultimately, my preferred build method uses the
Unix Makefilesgenerator and building it much the same as one would do on Linux; it seems Visual Studio does not particularly like working with ncurses in any form.
- CLion's not a fan of the Windows CMake toolchain, so you need to install the 64-bit Cygwin CMake/make/gcc toolchains (or MinGW).
- CLion in any platform regardless will fail to run the program, so you need to run it inside Cygwin or other terminal to play the game.
- Should build fine otherwise, from what I've tested, as long as CLion itself is configured correctly.