Building Sangband 101129 SDL on Linux

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mikko Lehtinen
    Veteran
    • Sep 2010
    • 1246

    Building Sangband 101129 SDL on Linux

    Hello,

    I'm trying to build the SDL version of the newest Sangband on Debian Squeeze, but I'm getting errors.

    I'm a newbie on building, but I did manage to build these successfully on the same machine:
    - SDL version of Leon's Sangband 1.0.
    - Curses version of the newest Sangband (101129)

    These are the errors I get:

    main-sdl.c:377:71: error: macro "FREE" requires 2 arguments, but only 1 given
    main-sdl.c: In function \u2018stretch_recalculate_array_sdl\u2019:
    main-sdl.c:377: error: \u2018FREE\u2019 undeclared (first use in this function)
    main-sdl.c:377: error: (Each undeclared identifier is reported only once
    main-sdl.c:377: error: for each function it appears in.)
    main-sdl.c:378:71: error: macro "FREE" requires 2 arguments, but only 1 given
    main-sdl.c:657:23: error: macro "FREE" requires 2 arguments, but only 1 given
    main-sdl.c: In function \u2018remove_font_sdl\u2019:
    main-sdl.c:657: error: \u2018FREE\u2019 undeclared (first use in this function)
    main-sdl.c:771:17: error: macro "FREE" requires 2 arguments, but only 1 given
    main-sdl.c: In function \u2018create_glyph_surface\u2019:
    main-sdl.c:771: error: \u2018FREE\u2019 undeclared (first use in this function)
    main-sdl.c:3360:76: error: macro "FREE" requires 2 arguments, but only 1 given
    main-sdl.c: In function \u2018hook_quit\u2019:
    main-sdl.c:3360: error: \u2018FREE\u2019 undeclared (first use in this function)
    main-sdl.c:3361:76: error: macro "FREE" requires 2 arguments, but only 1 given
    main-sdl.c:3364:21: error: macro "FREE" requires 2 arguments, but only 1 given
    make: *** [main-sdl.o] Error 1

    Can someone help?

    Mikko
  • camlost
    Sangband 1.x Maintainer
    • Apr 2007
    • 523

    #2
    I haven't built the SDL version, so I haven't fixed some of the bugs in it.

    The 'FREE' macros now takes a second parameter of the datatype.

    a chunk of Bronze {These look tastier than they are. !E}
    3 blank Parchments (Vellum) {No french novels please.}

    Comment

    • takkaria
      Veteran
      • Apr 2007
      • 1951

      #3
      Originally posted by camlost
      I haven't built the SDL version, so I haven't fixed some of the bugs in it.

      The 'FREE' macros now takes a second parameter of the datatype.

      http://code.google.com/p/skills-angb...s/detail?id=41
      Why? That information isn't used anywhere.
      takkaria whispers something about options. -more-

      Comment

      • camlost
        Sangband 1.x Maintainer
        • Apr 2007
        • 523

        #4
        Originally posted by takkaria
        Why? That information isn't used anywhere.
        I think I got confused when I was implementing the character history. The code I got from someone/somewhere used a different set of macros. I guess I figured that the data type was important.

        I've reverted the changes to the macros in r132. Let me know if that fixes your problem, Mikko.
        a chunk of Bronze {These look tastier than they are. !E}
        3 blank Parchments (Vellum) {No french novels please.}

        Comment

        • Mikko Lehtinen
          Veteran
          • Sep 2010
          • 1246

          #5
          It's working now. Thanks a lot!

          Comment

          • Mikko Lehtinen
            Veteran
            • Sep 2010
            • 1246

            #6
            Here's a little guide on how to build the latest development version of SDL-Sangband on Debian. It's remarkably easy. Tested on Debian Squeeze, but this might well work on other Debian versions and Ubuntu.

            1. Install these packages using your package manager: gcc, libsdl1.2-dev, libsdl-mixer1.2-dev, libsdl-ttf2.0-dev, subversion. (You need libsdl-mixer1.2-dev only if you want sound. You need subversion only if you want to grab the development version.)

            2. Grab the latest source by writing this in terminal:
            "svn checkout http://skills-angband.googlecode.com/svn/trunk/ skills-angband-read-only"
            This command will magically create a new directory "skills-angband-read-only".

            3. Go to the directory "skills-angband-read-only/src", and write this in terminal:
            "make -fMakefile.sdl install"

            4. It's done! An executable appears in the main Sangband directory. At least in Gnome I can start the game just by clicking the icon.

            Comment

            • Bostock
              Swordsman
              • Aug 2007
              • 335

              #7
              Thank you Mikko!

              Thank you very kindly for that guide, Mikko - I used it with success despite being only an advanced layman in Linux.

              Now if only I could figure out how to get my built Sangband to run from just a double-click in Nautilus, instead of sudo ./sangband...
              So you ride yourselves over the fields and you make all your animal deals and your wise men don't know how it feels to be thick as a brick.

              Comment

              Working...
              😀
              😂
              🥰
              😘
              🤢
              😎
              😞
              😡
              👍
              👎