I've downloaded the latest version of freetype, added freetype.lib and the include folder to my project and linked everything in project properties. Is there something I'm missing?
I'm getting 7 unresolved externals:
Error LNK2019 unresolved external symbol __imp_FT_Stream_OpenLZW referenced in function PCF_Face_Init Wizzy-core C:\Users\CM\Documents\SourceTree\Wizzy\WizzyEngine\Wizzy-core\freetype.lib(pcf.obj) 1
Error LNK2019 unresolved external symbol __imp_FT_Bitmap_Convert referenced in function tt_face_load_sbit_image Wizzy-core C:\Users\CM\Documents\SourceTree\Wizzy\WizzyEngine\Wizzy-core\freetype.lib(sfnt.obj) 1
Error LNK2019 unresolved external symbol __imp_FT_Bitmap_Done referenced in function tt_face_load_sbit_image Wizzy-core C:\Users\CM\Documents\SourceTree\Wizzy\WizzyEngine\Wizzy-core\freetype.lib(sfnt.obj) 1
Error LNK2019 unresolved external symbol __imp_FT_Bitmap_Init referenced in function tt_face_load_sbit_image Wizzy-core C:\Users\CM\Documents\SourceTree\Wizzy\WizzyEngine\Wizzy-core\freetype.lib(sfnt.obj) 1
Error LNK2019 unresolved external symbol __imp_FT_Get_Font_Format referenced in function FT_Load_Glyph Wizzy-core C:\Users\CM\Documents\SourceTree\Wizzy\WizzyEngine\Wizzy-core\freetype.lib(ftbase.obj) 1
Error LNK2019 unresolved external symbol __imp_FT_Gzip_Uncompress referenced in function woff_open_font Wizzy-core C:\Users\CM\Documents\SourceTree\Wizzy\WizzyEngine\Wizzy-core\freetype.lib(sfnt.obj) 1
Error LNK2019 unresolved external symbol __imp_FT_Stream_OpenGzip referenced in function PCF_Face_Init Wizzy-core C:\Users\CM\Documents\SourceTree\Wizzy\WizzyEngine\Wizzy-core\freetype.lib(pcf.obj) 1
EDIT:
It actually builds fine until I call FT_Init_FreeType()
This is all the code that's related to FreeType
/******fonthandler.h******/
#pragma once
#include <ft2build.h>
#include FT_FREETYPE_H
class FontHandler {
private:
FT_Library m_lib;
private:
FontHandler() {}
public:
bool Init();
};
/******fonthandler.cpp******/
#include "fonthandler.h"
#include "..\..\..\debug\debugging.h"
bool FontHandler::Init() {
auto _error = FT_Init_FreeType(&m_lib);
if (_error) {
log("Failed to initialize FreeType...");
log("Error: '{0}'", _error);
}
return !_error;
}