首页 > 解决方案 > 使用 Freetype 后未解决的外部问题 [dupe]

问题描述

我正在尝试使用 freetype 渲染一些文本,我基本上按照每个 vadum 遵循这个https://learnopengl.com/In-Practice/Text-Rendering但我收到的编译错误看起来像这样:

Error   LNK2019 unresolved external symbol FT_Init_FreeType referenced in function "void __cdecl Game::LoadContent(void)" (?LoadContent@Game@@YAXXZ)    TrainSim    
Error   LNK2019 unresolved external symbol FT_Done_FreeType referenced in function "void __cdecl Game::LoadContent(void)" (?LoadContent@Game@@YAXXZ)    TrainSim    
Error   LNK2019 unresolved external symbol FT_New_Face referenced in function "void __cdecl Game::LoadContent(void)" (?LoadContent@Game@@YAXXZ) TrainSim    
Error   LNK2019 unresolved external symbol FT_Done_Face referenced in function "void __cdecl Game::LoadContent(void)" (?LoadContent@Game@@YAXXZ)    TrainSim    
Error   LNK2019 unresolved external symbol FT_Set_Pixel_Sizes referenced in function "void __cdecl Game::LoadContent(void)" (?LoadContent@Game@@YAXXZ)  TrainSim    
Error   LNK2019 unresolved external symbol FT_Load_Char referenced in function "void __cdecl Game::LoadContent(void)" (?LoadContent@Game@@YAXXZ)    TrainSim    

在我的包含文件夹中,我有“freetype”包含文件夹和“ft2build.h”文件,在我的库中,我有一个“freetyped.lib”文件

我尝试添加msvcrt.libmsvcmrt.lib链接器附加依赖项,但这引入了更多错误。

标签: c++openglfreetype

解决方案


推荐阅读