Trouble compiling

Help
kebab
2011-03-22
2013-05-20
  • kebab

    kebab - 2011-03-22

    Hi, I'm just to trying to compile cubosphere on Debian squeeze and I am getting the following error:

    me@nemroth:~/Downloads/cubo$ make
    g++  -I/usr/include/lua50 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -o cubosphere -DDATADIR=\"/usr/local/share/cubosphere\" -L/usr/include -llualib50 -llua50 -L/usr/lib -lSDL -lGL -lGLEW -lGLU -lSDL_mixer -ljpeg -lSDL_ttf src/*.cpp
    In file included from src/game.hpp:29,
                     from src/cuboactors.cpp:20:
    src/fonts.hpp:33:25: error: SDL/SDL_ttf.h: No such file or directory
    In file included from src/game.hpp:29,
                     from src/cuboactors.cpp:20:
    src/fonts.hpp:44: error: ISO C++ forbids declaration of TTF_Font with no type
    src/fonts.hpp:44: error: expected ; before * token
    src/fonts.hpp:51: error: ISO C++ forbids declaration of TTF_Font with no type
    src/fonts.hpp:51: error: expected ; before * token
    src/fonts.hpp:52: error: expected ; before } token
    src/fonts.hpp: In constructor TSizedFont::TSizedFont():
    src/fonts.hpp:47: error: class TSizedFont does not have any field named font
    In file included from src/game.hpp:29,
                     from src/cuboboxes.cpp:36:
    src/fonts.hpp:33:25: error: SDL/SDL_ttf.h: No such file or directory
    In file included from src/game.hpp:29,
                     from src/cuboboxes.cpp:36:
    src/fonts.hpp:44: error: ISO C++ forbids declaration of TTF_Font with no type
    src/fonts.hpp:44: error: expected ; before * token
    src/fonts.hpp:51: error: ISO C++ forbids declaration of TTF_Font with no type
    src/fonts.hpp:51: error: expected ; before * token
    src/fonts.hpp:52: error: expected ; before } token
    src/fonts.hpp: In constructor TSizedFont::TSizedFont():
    src/fonts.hpp:47: error: class TSizedFont does not have any field named font
    In file included from src/game.hpp:29,
                     from src/cubolevels.cpp:25:
    src/fonts.hpp:33:25: error: SDL/SDL_ttf.h: No such file or directory
    In file included from src/game.hpp:29,
                     from src/cubolevels.cpp:25:
    src/fonts.hpp:44: error: ISO C++ forbids declaration of TTF_Font with no type
    src/fonts.hpp:44: error: expected ; before * token
    src/fonts.hpp:51: error: ISO C++ forbids declaration of TTF_Font with no type
    src/fonts.hpp:51: error: expected ; before * token
    src/fonts.hpp:52: error: expected ; before } token
    src/fonts.hpp: In constructor TSizedFont::TSizedFont():
    src/fonts.hpp:47: error: class TSizedFont does not have any field named font
    In file included from src/fonts.cpp:20:
    src/fonts.hpp:33:25: error: SDL/SDL_ttf.h: No such file or directory
    In file included from src/fonts.cpp:20:
    src/fonts.hpp:44: error: ISO C++ forbids declaration of TTF_Font with no type
    src/fonts.hpp:44: error: expected ; before * token
    src/fonts.hpp:51: error: ISO C++ forbids declaration of TTF_Font with no type
    src/fonts.hpp:51: error: expected ; before * token
    src/fonts.hpp:52: error: expected ; before } token
    src/fonts.hpp: In constructor TSizedFont::TSizedFont():
    src/fonts.hpp:47: error: class TSizedFont does not have any field named font
    src/fonts.cpp: In member function void TSizedFont::DestructFont():
    src/fonts.cpp:52: error: font was not declared in this scope
    src/fonts.cpp:54: error: TTF_CloseFont was not declared in this scope
    src/fonts.cpp: In member function int TSizedFont::Load(std::string, int):
    src/fonts.cpp:61: error: font was not declared in this scope
    src/fonts.cpp:61: error: TTF_OpenFont was not declared in this scope
    src/fonts.cpp:62: error: TTF_GetError was not declared in this scope
    src/fonts.cpp: In member function void TFontCache::Setup(TLoadedFont*, std::string, int):
    src/fonts.cpp:180: error: class TSizedFont has no member named GetFont
    src/fonts.cpp:180: error: TTF_RenderUTF8_Blended was not declared in this scope
    src/fonts.cpp: In member function void TFont::Init():
    src/fonts.cpp:393: error: TTF_Init was not declared in this scope
    src/fonts.cpp:394: error: TTF_GetError was not declared in this scope
    src/fonts.cpp:395: error: TTF_Quit was not declared in this scope
    In file included from src/game.hpp:29,
                     from src/game.cpp:15:
    src/fonts.hpp:33:25: error: SDL/SDL_ttf.h: No such file or directory
    In file included from src/game.hpp:29,
                     from src/game.cpp:15:
    src/fonts.hpp:44: error: ISO C++ forbids declaration of TTF_Font with no type
    src/fonts.hpp:44: error: expected ; before * token
    src/fonts.hpp:51: error: ISO C++ forbids declaration of TTF_Font with no type
    src/fonts.hpp:51: error: expected ; before * token
    src/fonts.hpp:52: error: expected ; before } token
    src/fonts.hpp: In constructor TSizedFont::TSizedFont():
    src/fonts.hpp:47: error: class TSizedFont does not have any field named font
    In file included from src/game.hpp:29,
                     from src/luautils.cpp:49:
    src/fonts.hpp:33:25: error: SDL/SDL_ttf.h: No such file or directory
    In file included from src/game.hpp:29,
                     from src/luautils.cpp:49:
    src/fonts.hpp:44: error: ISO C++ forbids declaration of TTF_Font with no type
    src/fonts.hpp:44: error: expected ; before * token
    src/fonts.hpp:51: error: ISO C++ forbids declaration of TTF_Font with no type
    src/fonts.hpp:51: error: expected ; before * token
    src/fonts.hpp:52: error: expected ; before } token
    src/fonts.hpp: In constructor TSizedFont::TSizedFont():
    src/fonts.hpp:47: error: class TSizedFont does not have any field named font
    In file included from src/game.hpp:29,
                     from src/main.cpp:49:
    src/fonts.hpp:33:25: error: SDL/SDL_ttf.h: No such file or directory
    In file included from src/game.hpp:29,
                     from src/main.cpp:49:
    src/fonts.hpp:44: error: ISO C++ forbids declaration of TTF_Font with no type
    src/fonts.hpp:44: error: expected ; before * token
    src/fonts.hpp:51: error: ISO C++ forbids declaration of TTF_Font with no type
    src/fonts.hpp:51: error: expected ; before * token
    src/fonts.hpp:52: error: expected ; before } token
    src/fonts.hpp: In constructor TSizedFont::TSizedFont():
    src/fonts.hpp:47: error: class TSizedFont does not have any field named font
    In file included from src/game.hpp:29,
                     from src/models.cpp:40:
    src/fonts.hpp:33:25: error: SDL/SDL_ttf.h: No such file or directory
    In file included from src/game.hpp:29,
                     from src/models.cpp:40:
    src/fonts.hpp:44: error: ISO C++ forbids declaration of TTF_Font with no type
    src/fonts.hpp:44: error: expected ; before * token
    src/fonts.hpp:51: error: ISO C++ forbids declaration of TTF_Font with no type
    src/fonts.hpp:51: error: expected ; before * token
    src/fonts.hpp:52: error: expected ; before } token
    src/fonts.hpp: In constructor TSizedFont::TSizedFont():
    src/fonts.hpp:47: error: class TSizedFont does not have any field named font
    In file included from src/game.hpp:29,
                     from src/textures.cpp:35:
    src/fonts.hpp:33:25: error: SDL/SDL_ttf.h: No such file or directory
    In file included from src/game.hpp:29,
                     from src/textures.cpp:35:
    src/fonts.hpp:44: error: ISO C++ forbids declaration of TTF_Font with no type
    src/fonts.hpp:44: error: expected ; before * token
    src/fonts.hpp:51: error: ISO C++ forbids declaration of TTF_Font with no type
    src/fonts.hpp:51: error: expected ; before * token
    src/fonts.hpp:52: error: expected ; before } token
    src/fonts.hpp: In constructor TSizedFont::TSizedFont():
    src/fonts.hpp:47: error: class TSizedFont does not have any field named font
    In file included from src/game.hpp:29,
                     from src/themes.cpp:21:
    src/fonts.hpp:33:25: error: SDL/SDL_ttf.h: No such file or directory
    In file included from src/game.hpp:29,
                     from src/themes.cpp:21:
    src/fonts.hpp:44: error: ISO C++ forbids declaration of TTF_Font with no type
    src/fonts.hpp:44: error: expected ; before * token
    src/fonts.hpp:51: error: ISO C++ forbids declaration of TTF_Font with no type
    src/fonts.hpp:51: error: expected ; before * token
    src/fonts.hpp:52: error: expected ; before } token
    src/fonts.hpp: In constructor TSizedFont::TSizedFont():
    src/fonts.hpp:47: error: class TSizedFont does not have any field named font
    make: *** [cubo] Error 1
    

    Can anyone tell me what I'm doing wrong?

     
  • Jack Frost

    Jack Frost - 2011-08-21

    The first error I see is

    src/fonts.hpp:33:25: error: SDL/SDL_ttf.h: No such file or directory
    

    so I'm guessing you don't have SDL_ttf installed support.  Use your distro's package manager to install libSDL_ttf-devel and that should probably do it.  When I come across a library like this that I don't have, I usually install all the packages with that name, not just the devel or whatever I need.  For example, I run OpenSUSE 11.4 and I have libSDL_ttf-2_0-0, libSDL_ttf-2_0-0-32bit, and libSDL_ttf-devel.  (I don't know how different distros hande installing simultaneous 32-bit and 64-bit packages.  This works in my environment.)

     
  • kebab

    kebab - 2011-12-01

    Many thanks. I finally got around to trying again with beta 0.1 and all is good now.

    The game is great and works well on a TV with a gamepad. Just like the old days of Kula World.

    Only two small niggles:
    1. It would be nice for a tinny pause every time you turn ninety degrees like in the original.
    2. The sound of the beach ball landing is much much quieter than the other sound effects.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks