alexdantas / nSnake

The classic snake game with textual interface
http://nsnake.alexdantas.net
GNU General Public License v3.0
199 stars 57 forks source link

Compiler error #15

Closed EvergreenTheTree closed 10 years ago

EvergreenTheTree commented 10 years ago

This error occurred after running make -j5

src/Interface/Dialog.o: In function `Dialog::askBool(std::string, std::string, bool)':
Dialog.cpp:(.text+0x3ad): undefined reference to `Window::setTitle(std::string)'
collect2: error: ld returned 1 exit status
alexdantas commented 10 years ago

Interesting... I tried with g++ 4.9.1 and clang++ 3.4.2 but got no results.

Would you mind sharing your version?


As far as I can see, Window::setTitle accepts two parameters - a std::string and a custom enum Window::BorderType. The second parameter is optional, since I initialize it with Window::TOP_LEFT.

Perhaps this is an issue with C++ enum naming?

EvergreenTheTree commented 10 years ago

The compiler version is g++ 4.8.2 That might have something to do with it.

Full g++ -v output is here: http://pastebin.ubuntu.com/8003204/

lynus commented 10 years ago

I cloned the repo and tested with g++ 4.8.2 , no thing went wrong

alexdantas commented 10 years ago

Thanks, @lynus ! @4Evergreen4, I think it might be a synchronization error. In one of the latest commits I fixed this issue and perhaps your local nSnake version got caught up in the commit mess.

Could you try doing the following?

$ cd your/nsnake/folder
$ git pull
$ make clean all

If it doesn't work, please try getting nSnake again:

$ git clone https://github.com/alexdantas/nsnake
$ cd nsnake
$ make

If even that doesn't work I'm concerned it could be a very localized issue. On this case, what is your Linux distribution? Could you post the output of uname -a?

Sorry for all this trouble, I shold make sure nSnake is stable before commiting from now on.

EvergreenTheTree commented 10 years ago

It works now, not sure what the problem was.

alexdantas commented 10 years ago

Wow, at least it works now :laughing: