Jump to content
  • Advertisement
Sign in to follow this  

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.

If you intended to correct an error in the post then please contact us.

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 this post

Link to post
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] = {
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]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!