nSnake: A Clone of Old Classic Snake Game – Play in Linux Terminal

If you have any questions or problems regarding this article and want help within 24 Hours? Ask Now

Ravi Saive

Simple Word a Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux.

Receive Your Free Complimentary eBook NOW! -

Download Free Linux eBooks

Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Ubuntu Linux Toolbox: 1000+ Commands

You may also like...

9 Responses

  1. william derington says:

    how do i install on fedora 20

  2. Alexandre Dantas says:

    Hi, I’m the creator of nSnake!

    Apparently this error is due to old versions of compilers.
    You have to update GCC to 4.8.X.

    I’m trying to work around it, because nSnake uses features
    from the latest version of C++ and some compilers don’t
    support it.

    • Ravi Saive says:

      Dear Alex,

      Thanks for updating our fellow users, will definetly compile it again using latest GCC as you suggested.

  3. Abhilash Anandan says:

    Great article!

    A small correction in the article though.

    In the how to play nSnake section, it should be nsnake not snake.

  4. Hugo Lía says:

    It doesn’t compile on Ubuntu 12.04.
    Make ends with “Error 1″:


    # Compiling src/Interface/Menu/MenuItemTextbox.cpp…
    src/Interface/Menu/MenuItemTextbox.cpp: In member function ‘virtual void MenuItemTextbox::handleInput()’:
    src/Interface/Menu/MenuItemTextbox.cpp:53:21: error: ‘std::string’ has no member named ‘pop_back’
    make: *** [src/Interface/Menu/MenuItemTextbox.o] Error 1
    $

  5. plazma says:

    i have error when i tryin to make command like :

    # Compiling src/Game/Score.cpp…
    # Compiling src/Game/Game.cpp…
    # Compiling src/Game/Board.cpp…
    # Compiling src/Game/FruitManager.cpp…
    # Compiling src/Game/Player.cpp…
    # Compiling src/Interface/LayoutMainMenu.cpp…
    # Compiling src/Interface/Ncurses.cpp…
    # Compiling src/Interface/Layout.cpp…
    # Compiling src/Interface/LayoutFirstTime.cpp…
    # Compiling src/Interface/Menu/MenuItemNumberbox.cpp…
    # Compiling src/Interface/Menu/MenuItemCheckbox.cpp…
    # Compiling src/Interface/Menu/MenuItem.cpp…
    # Compiling src/Interface/Menu/MenuItemTextbox.cpp…
    src/Interface/Menu/MenuItemTextbox.cpp: ‘virtual void MenuItemTextbox::handleInput()’ üye fonksiyonunda:
    src/Interface/Menu/MenuItemTextbox.cpp:53:21: hata: ‘std::string’ ‘pop_back’ isimli üyeye sahip değil
    make: *** [src/Interface/Menu/MenuItemTextbox.o] Hata 1

  6. Rmahfuj says:

    when run #make on centOS 5_32 bit getting following error:

    [root@wizn nsnake-2.0.0]# make
    # Compiling src/Misc/Utils.cpp…
    cc1plus: error: unrecognized command line option “-std=c++0x”
    make: *** [src/Misc/Utils.o] Error 1

    [root@wizn nsnake-2.0.0]# gcc -v
    Using built-in specs.
    Target: i386-redhat-linux
    Configured with: ../configure –prefix=/usr –mandir=/usr/share/man –infodir=/usr/share/info –enable-shared –enable-threads=posix –enable-checking=release –with-system-zlib –enable-__cxa_atexit –disable-libunwind-exceptions –enable-libgcj-multifile –enable-languages=c,c++,objc,obj-c++,java,fortran,ada –enable-java-awt=gtk –disable-dssi –disable-plugin –with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre –with-cpu=generic –host=i386-redhat-linux
    Thread model: posix
    gcc version 4.1.2 20080704 (Red Hat 4.1.2-54)

  7. Rmahfuj says:

    when run #make on centos 6_x64 bit getting following error:

    [root@t-server nsnake-2.0.0]# make
    # Compiling src/Misc/Utils.cpp…
    src/Misc/Utils.cpp: In function ‘void Utils::Random::seed()’:
    src/Misc/Utils.cpp:46: error: ‘nullptr’ was not declared in this scope
    src/Misc/Utils.cpp: In function ‘int Utils::Random::between(int, int)’:
    src/Misc/Utils.cpp:51: error: ‘uniform_int_distribution’ is not a member of ‘std’
    src/Misc/Utils.cpp:51: error: expected primary-expression before ‘int’
    src/Misc/Utils.cpp:51: error: expected ‘;’ before ‘int’
    src/Misc/Utils.cpp:52: error: no matching function for call to ‘distance(std::mt19937&)’
    src/Misc/Utils.cpp: At global scope:
    src/Misc/Utils.cpp:49: warning: unused parameter ‘min’
    src/Misc/Utils.cpp:49: warning: unused parameter ‘max’
    src/Misc/Utils.cpp: In function ‘float Utils::Random::fbetween(float, float)’:
    src/Misc/Utils.cpp:57: error: ‘uniform_real_distribution’ is not a member of ‘std’
    src/Misc/Utils.cpp:57: error: expected primary-expression before ‘float’
    src/Misc/Utils.cpp:57: error: expected ‘;’ before ‘float’
    src/Misc/Utils.cpp:58: error: no matching function for call to ‘distance(std::mt19937&)’
    src/Misc/Utils.cpp: At global scope:
    src/Misc/Utils.cpp:55: warning: unused parameter ‘min’
    src/Misc/Utils.cpp:55: warning: unused parameter ‘max’
    src/Misc/Utils.cpp: In function ‘bool Utils::Random::boolean()’:
    src/Misc/Utils.cpp:63: error: ‘uniform_int_distribution’ is not a member of ‘std’
    src/Misc/Utils.cpp:63: error: expected primary-expression before ‘int’
    src/Misc/Utils.cpp:63: error: expected ‘;’ before ‘int’
    src/Misc/Utils.cpp:65: error: no matching function for call to ‘distance(std::mt19937&)’
    src/Misc/Utils.cpp: In function ‘void Utils::File::mkdir_p(std::string)’:
    src/Misc/Utils.cpp:105: error: ‘struct std::string’ has no member named ‘back’
    src/Misc/Utils.cpp: In function ‘std::vector<std::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::basic_string<char, std::char_traits, std::allocator > > > Utils::File::ls(std::string)’:
    src/Misc/Utils.cpp:207: error: ‘struct std::string’ has no member named ‘back’
    src/Misc/Utils.cpp: In function ‘std::string Utils::File::getHome()’:
    src/Misc/Utils.cpp:233: error: ‘struct std::string’ has no member named ‘back’
    src/Misc/Utils.cpp: In function ‘std::string Utils::File::getUser()’:
    src/Misc/Utils.cpp:245: error: ‘struct std::string’ has no member named ‘pop_back’
    make: *** [src/Misc/Utils.o] Error 1

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Join Over 75000+ Linux Users
  1. 51334
  2. 2657
  3. 16705

Enter your email to get latest Linux Howto's