From 4132da36f8a060ac0bd903cd9dee70b4c9323fa9 Mon Sep 17 00:00:00 2001 From: rich_b <56879808+rbarkmore@users.noreply.github.com> Date: Tue, 23 Jun 2020 09:02:53 -0400 Subject: [PATCH] Updated readme for freetype, explaing how to add the freetype library to CMakeLists.txt. --- src/7.in_practice/2.text_rendering/readme.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/7.in_practice/2.text_rendering/readme.md b/src/7.in_practice/2.text_rendering/readme.md index 7c373ed..714f5c8 100644 --- a/src/7.in_practice/2.text_rendering/readme.md +++ b/src/7.in_practice/2.text_rendering/readme.md @@ -42,7 +42,9 @@ Now, try again to build the project '7.in_practice__2.text_rendering' You will get linking errors this time, such as "bin\7.in_practice\Release\7.in_practice__2.text_rendering.exe : fatal error LNK1120: 6 unresolved externals" -We have to add 'freetype.lib' to the project '7.in_practice__2.text_rendering', right click on the project for the menu, select 'Properties', then select 'Linker', 'Input', and 'Additional Dependencies'. Edit the 'Additional Dependencies', and type into the list in the upper box, 'freetype.lib'. +To fix the linking errors, we have to add 'freetype.lib' to the project. The best way to add the library is to edit CMakeLists.txt again, this time, on line 3, add freetype to the 'set (LIBS...' entry list. It should look like this 'set(LIBS glfw3 opengl32 assimp freetype)' + +Rerun cmake. Build the project '7.in_practice__2.text_rendering' again, this time it should succeed and will create '7.in_practice__2.text_rendering.exe' under the 'bin' folder.