# TTF\_Font has initializer but incomplete type

**URL:** <https://discourse.libsdl.org/t/ttf-font-has-initializer-but-incomplete-type/14127>\
**Category:** SDL Development\
**Created:** [December 18, 2006, 6:07pm UTC](https://discourse.libsdl.org/t/ttf-font-has-initializer-but-incomplete-type/14127 "2006-12-18T18:07:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Morten](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/matt_morten/32/629_2.png) [@Matt\_Morten](https://discourse.libsdl.org/u/Matt_Morten)\
**Post date:** [December 18, 2006, 6:07pm UTC](https://discourse.libsdl.org/t/ttf-font-has-initializer-but-incomplete-type/14127/1 "2006-12-18T18:07:31Z")

</div>

Hello there,

I am using Mac OS X with XCode to create an SDL Application. I have  
also added the SDL\_ttf framework, and have included the freetype2  
library in the c++ compiler flags. I am coding in C++.

Here is a snippet:

#include \<SDL\_ttf/SDL\_ttf.h\>  
…

TTF\_Font fntArial12 = TTF\_OpenFont( “arial.ttf”, 12 );

I get the following error:

/Users/matt/Programming/SDLTag/Tag.cpp: In member function ‘void  
Tag::render(SDL\_Surface\*)’:  
/Users/matt/Programming/SDLTag/Tag.cpp:147: error: variable ‘TTF\_Font  
fntArial12’ has initializer but incomplete type

Does anybody have any ideas as to how to solve this issue?

Many thanks,  
Matt Morten

---

<div class="post-metadata">

**Author:** ![Christian\_Walther](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/christian_walther/32/322_2.png) [@Christian\_Walther](https://discourse.libsdl.org/u/Christian_Walther)\
**Post date:** [December 18, 2006, 9:00pm UTC](https://discourse.libsdl.org/t/ttf-font-has-initializer-but-incomplete-type/14127/2 "2006-12-18T21:00:58Z")

</div>

Matt Morten wrote:

> TTF\_Font fntArial12 = TTF\_OpenFont( “arial.ttf”, 12 );

You probably mean

TTF\_Font \*fntArial12 = TTF\_OpenFont( “arial.ttf”, 12 );

-Christian
