Public Group

# FreeType2 in static library

This topic is 4579 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi all, now that loading TGA files works and my ... uummm ... "engine" can create spacing information for bitmap font files I want to create those files dynamically using the FreeType2 library. I want to put it into the static library ... not link to a DLL. What I tried is putting the src and include files into the project and uncheck "Compile as C++ ...". However when I try to compile this I get an error: #include expects <FILENAME> or "FILENAME" FreeType2 uses macros for header filenames. Somehow the compiler doesn't seem to like this. Has anybody done this successfully? What can I try to get this to work? Edit: I should probably mention that I use Dev-C++. [Edited by - Clueless on May 28, 2006 3:02:07 PM]

##### Share on other sites
Ok ... it seems as if using makros there works in general.
But somewhere it said a file called "internal.h" should be included by ft2build.h ...
but it isn't included from there. When I add the code to include the file there I don't get much further.

There are a lot of "syntax error at '##' token" errors.

Guess I need to know if there is a special route to take if I want to build it inside a static library.

EDIT: Disabling support for traditional pre-processor helped here ...
next problem: forward declaration of local uInt inflate_mask[17]; leads to "redeclared ..." error here:
local const uInt inflate_mask[17] = {    0x0000,    0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,    0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff};

This kind of error usually went away when I disabled "build as c++ file".
I threw it out of the header file and now the build process works.

Does anybody know if the forward declaration might be needed somehow/somewhere?

[Edited by - Clueless on May 28, 2006 8:50:19 PM]

1. 1
2. 2
3. 3
Rutin
15
4. 4
khawk
14
5. 5
frob
12
• ### Forum Statistics

• Total Topics
633661
• Total Posts
3013220
×