jmoon018 / PacVim

GNU Lesser General Public License v3.0
3.24k stars 193 forks source link

Missing cursesw.h? #2

Closed hinesro closed 9 years ago

hinesro commented 9 years ago

A lot of the cpp files are linking to this header file, but it's not in the src directory. Could it have been removed by accident?

alexbowers commented 9 years ago

Same issue

RossBarnie commented 9 years ago

Same issue

EDIT: For the record, here's the full output:

g++ -w src/game.cpp -pthread -std=c++11 -lncurses src/globals.cpp src/helperFns.cpp src/avatar.cpp src/ghost1.cpp -o pacvim
In file included from src/game.cpp:10:
src/globals.h:6:10: fatal error: 'cursesw.h' file not found
#include <cursesw.h>
         ^
1 error generated.
In file included from src/globals.cpp:1:
src/globals.h:6:10: fatal error: 'cursesw.h' file not found
#include <cursesw.h>
         ^
1 error generated.
In file included from src/helperFns.cpp:1:
src/globals.h:6:10: fatal error: 'cursesw.h' file not found
#include <cursesw.h>
         ^
1 error generated.
In file included from src/avatar.cpp:1:
In file included from src/avatar.h:8:
In file included from src/helperFns.h:4:
src/globals.h:6:10: fatal error: 'cursesw.h' file not found
#include <cursesw.h>
         ^
1 error generated.
In file included from src/ghost1.cpp:1:
In file included from src/ghost1.h:4:
In file included from src/avatar.h:8:
In file included from src/helperFns.h:4:
src/globals.h:6:10: fatal error: 'cursesw.h' file not found
#include <cursesw.h>
         ^
1 error generated.
jmoon018 commented 9 years ago

It was not accidental. Curses is a graphics library for terminals, and I used it to speed up the development process of the game. PacVim, therefore, require Curses to be downloaded and installed in order to work. After proper installation of Curses, the '#include ' should register and the game will compile. I will add this to the README for the future.

I have only tested this on Ubuntu. It can be installed on Ubuntu via the terminal: sudo apt-get install libncurses5-dev

I have not tried it, but this should provide good instructions for downloading, configuring, and installing

This page also contains the download links for ncurses

Let me know if this fixes your issues

hinesro commented 9 years ago

Thanks, that solved it! Great program.

betamos commented 9 years ago

Is that ncurses version really necessary, or could the old header files be used instead? I am asking because we don't really have access to it in homebrew for OS X yet, and probably other package managers as well, since it's a development build.

vimkin commented 9 years ago

I have installed ncurses like mentioned in this gist https://gist.github.com/cnruby/960344 but still have an issue that cursesw.h missing.

In file included from src/ghost1.cpp:1:
In file included from src/ghost1.h:4:
In file included from src/avatar.h:8:
In file included from src/helperFns.h:4:
src/globals.h:6:10: fatal error: 'cursesw.h' file not found
#include <cursesw.h>
         ^
1 error generated.
make: *** [all] Error 1```
MatthewWest commented 9 years ago

Just commenting on here, I've submitted a pull request that fixes the ncurses and other issues for Mac. With homebrew, you'll have to manually brew install ncurses then brew link ncurses --force because it refuses to link it by default otherwise. If you want my fork, you can use my fork until it gets merged into the main repo.

jmoon018 commented 9 years ago

I have merged @MatthewWest 's code into the main repo. I did a little bit of testing for OS X and it worked for me -- if there are still any installation problems, make a new issue w/ your operating system

Thanks