Discussion:
Include file locations
davecoventry
2014-10-14 06:17:19 UTC
Permalink
I'm trying to use the Freetype libraries.

The header files are in /usr/include/freetype2

I've added /usr/include/freetype2 and /usr/include/freetype2/config to the include directories portion in Tools>Options>C/C++.

The file ft2build.h contains the directive #include <config/ftheader.h>, which the compiler apparently cannot see.
/usr/include/freetype2/ft2build.h:37:29: fatal error: config/ftheader.h: No such file or directory
Code:
***@Threepwood:~$ cd /usr/include/
***@Threepwood:/usr/include$ ls freetype2/
config ftbzip2.h ftglyph.h ftmac.h ftsizes.h ftwinfnt.h
freetype.h ftcache.h ftgxval.h ftmm.h ftsnames.h ftxf86.h
ft2build.h ftcffdrv.h ftgzip.h ftmodapi.h ftstroke.h t1tables.h
ftadvanc.h ftchapters.h ftimage.h ftmoderr.h ftsynth.h ttnameid.h
ftautoh.h ftcid.h ftincrem.h ftotval.h ftsystem.h tttables.h
ftbbox.h fterrdef.h ftlcdfil.h ftoutln.h fttrigon.h tttags.h
ftbdf.h fterrors.h ftlist.h ftpfr.h ftttdrv.h ttunpat.h
ftbitmap.h ftgasp.h ftlzw.h ftrender.h fttypes.h
***@Threepwood:/usr/include$ ls freetype2/config/
ftconfig.h ftheader.h ftmodule.h ftoption.h ftstdlib.h




The compiler appears to be finding the reference to config/ftheader.h in ft2build.h and is looking in /usr/include/config/ftheader.h
Alexander Simon
2014-10-14 07:20:40 UTC
Permalink
Hi davecoventry,

According to pkg-config you should include only /usr/include/freetype2.
See output of command:
#pkg-config --cflags freetype2
-I/usr/include/freetype2

The right way to include libraries and paths is by `pkg-config --libs
freetype2` and `pkg-config --cflags freetype2`.
If you have an managed project, add library in Project
properties->Linker->Libraries->Add PkgConfig Library
and set check box Project properties->C Compiler->Use linker Libraries

Alexander
Post by davecoventry
I'm trying to use the Freetype libraries.
The header files are in /usr/include/freetype2
I've added /usr/include/freetype2 and /usr/include/freetype2/config to the include directories portion in Tools>Options>C/C++.
The file ft2build.h contains the directive #include <config/ftheader.h>, which the compiler apparently cannot see.
/usr/include/freetype2/ft2build.h:37:29: fatal error: config/ftheader.h: No such file or directory
config ftbzip2.h ftglyph.h ftmac.h ftsizes.h ftwinfnt.h
freetype.h ftcache.h ftgxval.h ftmm.h ftsnames.h ftxf86.h
ft2build.h ftcffdrv.h ftgzip.h ftmodapi.h ftstroke.h t1tables.h
ftadvanc.h ftchapters.h ftimage.h ftmoderr.h ftsynth.h ttnameid.h
ftautoh.h ftcid.h ftincrem.h ftotval.h ftsystem.h tttables.h
ftbbox.h fterrdef.h ftlcdfil.h ftoutln.h fttrigon.h tttags.h
ftbdf.h fterrors.h ftlist.h ftpfr.h ftttdrv.h ttunpat.h
ftbitmap.h ftgasp.h ftlzw.h ftrender.h fttypes.h
ftconfig.h ftheader.h ftmodule.h ftoption.h ftstdlib.h
The compiler appears to be finding the reference to config/ftheader.h in ft2build.h and is looking in /usr/include/config/ftheader.h
Loading...