freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft] Included header files location


From: Dave Coventry
Subject: [ft] Included header files location
Date: Mon, 22 Dec 2014 11:35:43 +0200

I'm trying to use the Freetype headers.

I've run the freetype-config script with the --cflags option to
retrieve the appropriate compilation flags.

$ freetype-config --cflags
-I/usr/include/freetype2

My cpp file invokes the headers:

#include <freetype2/ft2build.h>

but the 'make' fails:

$ make
g++     main.cpp  -lglut -lGLEW -lGL -o main
In file included from text.h:8:0,
                 from main.cpp:8:
/usr/include/freetype2/ft2build.h:37:29: fatal error:
config/ftheader.h: No such file or directory
 #include <config/ftheader.h>
                             ^
compilation terminated.
make: *** [main] Error 1

Clearly it's not looking in /usr/include/freetype2/ for the 'config' directory.

I've tried softlinking the 'config' directory so that the compiler can
find it in the /usr/include directory, but a) this is porobably not
best practice and b) I get another error.

$ ln -s /usr/include/freetype2/config/ /usr/include/config
$ make
g++     main.cpp  -lglut -lGLEW -lGL -o main
In file included from main.cpp:8:0:
text.h:9:23: fatal error: freetype.h: No such file or directory
 #include FT_FREETYPE_H
                       ^
compilation terminated.
make: *** [main] Error 1

Is there anything else I could try?

Cheers,

Dave

PS, my Makefile is as follows:

INCLUDE=-I/usr/include/freetype2  -I/usr/include/freetype2/confg
CC=g++
LDLIBS=-lglut -lGLEW -lGL
all: main
clean:
rm -f *.o main
.PHONY: all clean



reply via email to

[Prev in Thread] Current Thread [Next in Thread]