Advertisement

Using FTGL for project on Debian

Started by November 06, 2004 10:51 PM
1 comment, last by leiavoia 20 years ago
I'm trying to use the FTGL lib for rendering text in OpenGL. I can either compile and install manually or just install the ftgl-dev.deb package. Either way, i get these errors trying to create a very simple program. Strangely, when i compile the included demo app, it compiles just fine. Any idea what i'm missing or how to fix it? It seems like it's having a hard to finding some freetype headers but i know they are installed. Maybe in the wrong place? If you can help in any way, thank you! ***************************
leiavoia@levbox:~/programming/c++/theark$ make
g++ -Wall -pedantic `sdl-config --cflags`  -c src/core/ResourceMgr.cpp -o src/core/ResourceMgr.o
In file included from /usr/include/FTGL/FTFont.h:4,
                 from /usr/include/FTGL/FTGLTextureFont.h:4,
                 from src/core/ResourceMgr.h:179,
                 from src/core/ResourceMgr.cpp:1:
/usr/include/ft2build.h:56:38: freetype/config/ftheader.h: No such file or directory
In file included from /usr/include/FTGL/FTGLTextureFont.h:4,
                 from src/core/ResourceMgr.h:179,
                 from src/core/ResourceMgr.cpp:1:
/usr/include/FTGL/FTFont.h:5:10: #include expects "FILENAME" or <FILENAME>
In file included from /usr/include/FTGL/FTFont.h:7,
                 from /usr/include/FTGL/FTGLTextureFont.h:4,
                 from src/core/ResourceMgr.h:179,
                 from src/core/ResourceMgr.cpp:1:
/usr/include/FTGL/FTFace.h:5:10: #include expects "FILENAME" or <FILENAME>
/usr/include/FTGL/FTFace.h:6:10: #include expects "FILENAME" or <FILENAME>
In file included from /usr/include/FTGL/FTFace.h:9,
                 from /usr/include/FTGL/FTFont.h:7,
                 from /usr/include/FTGL/FTGLTextureFont.h:4,
                 from src/core/ResourceMgr.h:179,
                 from src/core/ResourceMgr.cpp:1:
/usr/include/FTGL/FTPoint.h:5:10: #include expects "FILENAME" or <FILENAME>
/usr/include/FTGL/FTPoint.h:6:10: #include expects "FILENAME" or <FILENAME>
In file included from /usr/include/FTGL/FTFace.h:9,
                 from /usr/include/FTGL/FTFont.h:7,
                 from /usr/include/FTGL/FTGLTextureFont.h:4,
                 from src/core/ResourceMgr.h:179,
                 from src/core/ResourceMgr.cpp:1:
/usr/include/FTGL/FTPoint.h:39: error: parse error before `&' token
/usr/include/FTGL/FTPoint.h:41: error: missing ';' before right brace
/usr/include/FTGL/FTPoint.h: In constructor `FTPoint::FTPoint()':
/usr/include/FTGL/FTPoint.h:20: error: class `FTPoint' does not have any field
   named `x'
/usr/include/FTGL/FTPoint.h:20: error: class `FTPoint' does not have any field
   named `y'
/usr/include/FTGL/FTPoint.h:20: error: class `FTPoint' does not have any field
   named `z'
/usr/include/FTGL/FTPoint.h: In constructor `FTPoint::FTPoint(double, double,
   double)':
/usr/include/FTGL/FTPoint.h:31: error: class `FTPoint' does not have any field
   named `x'
/usr/include/FTGL/FTPoint.h:31: error: class `FTPoint' does not have any field
   named `y'
/usr/include/FTGL/FTPoint.h:31: error: class `FTPoint' does not have any field
   named `z'
/usr/include/FTGL/FTPoint.h: At global scope:
/usr/include/FTGL/FTPoint.h:49: error: ISO C++ forbids defining types within
   return type
/usr/include/FTGL/FTPoint.h:49: error: syntax error before `&' token
/usr/include/FTGL/FTPoint.h:52: error: syntax error before `+=' token
/usr/include/FTGL/FTPoint.h:53: error: syntax error before `+=' token
/usr/include/FTGL/FTPoint.h:65: error: friend declaration not in class
   definition
/usr/include/FTGL/FTPoint.h:74: error: friend declaration not in class
   definition
/usr/include/FTGL/FTPoint.h:81: error: parse error before `private'
In file included from /usr/include/FTGL/FTFace.h:10,
                 from /usr/include/FTGL/FTFont.h:7,
                 from /usr/include/FTGL/FTGLTextureFont.h:4,
                 from src/core/ResourceMgr.h:179,
                 from src/core/ResourceMgr.cpp:1:
/usr/include/FTGL/FTSize.h:6:10: #include expects "FILENAME" or <FILENAME>
In file included from /usr/include/FTGL/FTFace.h:10,
                 from /usr/include/FTGL/FTFont.h:7,
                 from /usr/include/FTGL/FTGLTextureFont.h:4,
                 from src/core/ResourceMgr.h:179,
                 from src/core/ResourceMgr.cpp:1:
/usr/include/FTGL/FTSize.h:43: error: `FT_Face' was not declared in this scope
/usr/include/FTGL/FTSize.h:43: error: `face' was not declared in this scope
/usr/include/FTGL/FTSize.h:43: error: parse error before `int'
/usr/include/FTGL/FTSize.h:106: error: parse error before `)' token
/usr/include/FTGL/FTSize.h:108: error: semicolon missing after declaration of `
   FTSize'
/usr/include/FTGL/FTSize.h:117: error: 'FT_Size' is used as a type, but is not
   defined as a type.
/usr/include/FTGL/FTSize.h:127: error: 'FT_Error' is used as a type, but is not
   defined as a type.
/usr/include/FTGL/FTSize.h:129: error: parse error before `}' token
In file included from /usr/include/FTGL/FTFont.h:7,
                 from /usr/include/FTGL/FTGLTextureFont.h:4,
                 from src/core/ResourceMgr.h:179,
                 from src/core/ResourceMgr.cpp:1:
/usr/include/FTGL/FTFace.h:72: error: syntax error before `*' token
/usr/include/FTGL/FTFace.h:84: error: ISO C++ forbids defining types within
   return type
/usr/include/FTGL/FTFace.h:84: error: syntax error before `&' token
/usr/include/FTGL/FTFace.h:86: error: non-member function `unsigned int
   UnitsPerEM()' cannot have `const' method qualifier
/usr/include/FTGL/FTFace.h:100: error: syntax error before `*' token
/usr/include/FTGL/FTFace.h:110: error: parse error before `int'
/usr/include/FTGL/FTFace.h:115: error: non-member function `unsigned int
   GlyphCount()' cannot have `const' method qualifier
/usr/include/FTGL/FTFace.h: In function `unsigned int GlyphCount()':
/usr/include/FTGL/FTFace.h:115: error: `numGlyphs' undeclared (first use this
   function)
/usr/include/FTGL/FTFace.h:115: error: (Each undeclared identifier is reported
   only once for each function it appears in.)
/usr/include/FTGL/FTFace.h: At global scope:
/usr/include/FTGL/FTFace.h:122: error: parse error before `)' token
/usr/include/FTGL/FTFace.h:138: error: `int numGlyphs' used prior to
   declaration
/usr/include/FTGL/FTFace.h:140: error: syntax error before `*' token
/usr/include/FTGL/FTFace.h:145: error: 'FT_Error' is used as a type, but is not
   defined as a type.
/usr/include/FTGL/FTFace.h:146: error: parse error before `}' token
In file included from /usr/include/FTGL/FTGLTextureFont.h:4,
                 from src/core/ResourceMgr.h:179,
                 from src/core/ResourceMgr.cpp:1:
/usr/include/FTGL/FTFont.h:84: error: `FT_Encoding' was not declared in this
   scope
/usr/include/FTGL/FTFont.h:84: error: parse error before `)' token
/usr/include/FTGL/FTFont.h:98: error: syntax error before `*' token
/usr/include/FTGL/FTFont.h:199: error: parse error before `)' token
/usr/include/FTGL/FTFont.h:201: error: semicolon missing after declaration of `
   FTFont'
/usr/include/FTGL/FTFont.h:201: error: parse error before `protected'
/usr/include/FTGL/FTFont.h:201: error: parse error before `:' token
/usr/include/FTGL/FTFont.h:216: error: no matching function for call to `FTFace
   ::FTFace()'
/usr/include/FTGL/FTFace.h:19: error: candidates are: FTFace::FTFace(const
   FTFace&)
/usr/include/FTGL/FTFace.h:34: error:                 FTFace::FTFace(const
   unsigned char*, unsigned int)
/usr/include/FTGL/FTFace.h:26: error:                 FTFace::FTFace(const
   char*)
/usr/include/FTGL/FTFont.h:221: error: redefinition of `FTSize charSize'
/usr/include/FTGL/FTFace.h:133: error: `FTSize charSize' previously declared
   here
/usr/include/FTGL/FTFont.h:226: error: 'FT_Error' is used as a type, but is not
   defined as a type.
/usr/include/FTGL/FTFont.h:228: error: parse error before `private'
/usr/include/FTGL/FTFont.h:254: error: parse error before `}' token
src/core/ResourceMgr.cpp: In member function `FTFont*
   FTGLFontManager::GetFont(const char*, int)':
src/core/ResourceMgr.cpp:409: error: `string' undeclared (first use this
   function)
src/core/ResourceMgr.cpp:409: error: parse error before `=' token
src/core/ResourceMgr.cpp:411: error: `fontKey' undeclared (first use this
   function)
src/core/ResourceMgr.cpp:413: error: `LOGMSG' undeclared (first use this
   function)
src/core/ResourceMgr.cpp:417: error: no matching function for call to `
   FTGLTextureFont::FTGLTextureFont()'
/usr/include/FTGL/FTGLTextureFont.h:18: error: candidates are:
   FTGLTextureFont::FTGLTextureFont(const FTGLTextureFont&)
/usr/include/FTGL/FTGLTextureFont.h:33: error:
   FTGLTextureFont::FTGLTextureFont(const unsigned char*, unsigned int)
/usr/include/FTGL/FTGLTextureFont.h:25: error:
   FTGLTextureFont::FTGLTextureFont(const char*)
src/core/ResourceMgr.cpp:419: error: parse error before `=' token
src/core/ResourceMgr.cpp:421: error: `fullname' undeclared (first use this
   function)
src/core/ResourceMgr.cpp:421: error: `Open' undeclared (first use this
   function)
src/core/ResourceMgr.cpp:422: error: `LOGERROR' undeclared (first use this
   function)
make: *** [src/core/ResourceMgr.o] Error 1
leiavoia@levbox:~/programming/c++/theark$
It's not finding the freetype headers..

Mine are in the package libfreetype6-dev, and it installs the headers in /usr/include/freetype.
Perhaps it would help if you add

`freetype-config --cflags`

to your compile command!
Advertisement
i don't fully understand why, but that worked. Thanks! rating++

This topic is closed to new replies.

Advertisement