Compile anagramarama on Ubuntu 12.04

Download the source code from the anagramarama site here.

$ tar -zxvf anagramarama-src-0.4.tar.gz <enter>
$ cd anagrama* <enter>
$ mv makefile.linux makefile <enter>

To compile source code in Ubuntu, install
$ sudo apt-get install build-essentials automake libsdl-console libsdl-console-dev libsdl-image1.2 libsdl-net1.2 libsdl-mixer libsdl-gfx libsdl-sge libsdl-sge-dev libsdl-sound libsdl1.2-dev libsdl1.2-debian libsdl-mixer1.2-dev<enter>

Anagramarama compile on Ubuntu
When you type make to compile anagramarama source code for Ubuntu 64 bit, you get the following stream of errors
$ gcc `sdl-config –libs` -lSDL_mixer -o ag src/dlb.o src/linked.o src/sprite.o src/ag_core.o src/ag.o
src/ag.o: In function `displayAnswerBoxes’:
ag.c:(.text+0x14b): undefined reference to `SDL_MapRGB’
ag.c:(.text+0x15a): undefined reference to `SDL_FillRect’
ag.c:(.text+0x1a0): undefined reference to `SDL_MapRGB’
ag.c:(.text+0x1b3): undefined reference to `SDL_SetColorKey’
ag.c:(.text+0x1cc): undefined reference to `SDL_UpperBlit’
ag.c:(.text+0x1ef): undefined reference to `SDL_FillRect’

To overcome them, you can simply take the command for linking:
gcc `sdl-config --libs` -lSDL_mixer -o ag src/dlb.o src/linked.o src/sprite.o src/ag_core.o src/ag.o
and change it to:
$ gcc `sdl-config --libs` -o ag src/dlb.o src/linked.o src/sprite.o src/ag_core.o src/ag.o -lSDL_mixer -lSDL <enter>

Note that -lSDL_mixer -lSDL is moved to the end of the line.

Once done, you will get a file called ag that is the executable for anagramarama. To run it, type:

$ ag <enter>

If you install this game from the Ubuntu repositories, please be aware that it consumes a lot CPU. This bug was fixed in the source code but has not yet made it to the Ubuntu packages. Therefore, compiling from source is more worthwhile.

Leave a Reply

  

  

  

Blue Captcha Image
Refresh

*

September 2019
M T W T F S S
« Aug    
 1
2345678
9101112131415
16171819202122
23242526272829
30