Reputation: 2614
I include freetype and header, not I can find functions, but in building say me: error: undefined reference to FT_Init_FreeType
I read something, but my folder don't have lib file to add in pro file.
I download libary here, version 2.6.
How can I fix dat problem?
#include <freetype-2.6/include/ft2build.h>
#include FT_FREETYPE_H
....
FT_Library ft;
if(FT_Init_FreeType(&ft)) {
std::cout << "ERROR::FREETYPE: Could not init FreeType Library" << std::endl;
}
Upvotes: 0
Views: 1970
Reputation: 22166
The error you get is a linker error because you don't link against the freetype library.
To get the lib files, you either have to download the binaries from the freetype website (last available version is 2.35), or you compile the library yourself from the source version you already downloaded (use cmake for this). Instructions on how to compile can be found in the README and in docs/INSTALL.
Upvotes: 2