Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot include freetype headers on Linux

#include <ft2build.h>
#include FT_FREETYPE_H
int main() {
    return 0;
}

Here is the compiler output:

In file included from fonttest.cpp:1:
/usr/include/ft2build.h:56:10: fatal error: 'freetype/config/ftheader.h' file not found
#include <freetype/config/ftheader.h>
     ^
1 error generated.

I follow the official tutorial.

I have the packages installed:

i   libfreetype6        - FreeType 2 font engine, shared library files                  
i A libfreetype6:i386   - FreeType 2 font engine, shared library files                  
i   libfreetype6-dev    - FreeType 2 font engine, development files     

File /usr/include/freetype2/freetype/config/ftheader.h is there.

like image 254
exebook Avatar asked Sep 02 '26 19:09

exebook


1 Answers

If someone out there is struggling, you can try

sudo apt-get install libfreetype6-dev

like image 57
Ishimwe Aubain Consolateur Avatar answered Sep 04 '26 13:09

Ishimwe Aubain Consolateur