rougier / freetype-gl

OpenGL text using one vertex buffer, one texture and FreeType
Other
1.64k stars 264 forks source link

Wrong letter case in a constant name #274

Open wzhqwq opened 11 months ago

wzhqwq commented 11 months ago

An incorrect modification was made to a constant name in #235, causing a build failure.

The FONTCONFIG_LIBRARY is set in FindConfigFont.cmake while the Fontconfig_LIBRARY is used in demos/CMakeLists.txt. Therefore the library path of FontConfig is not included in the linking phase of target markup, resulting in the following error:

...
[ 94%] Linking C executable markup
Undefined symbols for architecture x86_64:
  "_FcConfigSubstitute", referenced from:
      _match_description in markup.c.o
  "_FcDefaultSubstitute", referenced from:
      _match_description in markup.c.o
  "_FcFontMatch", referenced from:
      _match_description in markup.c.o
  "_FcInit", referenced from:
      _match_description in markup.c.o
  "_FcNameParse", referenced from:
      _match_description in markup.c.o
  "_FcPatternDestroy", referenced from:
      _match_description in markup.c.o
  "_FcPatternGet", referenced from:
      _match_description in markup.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [demos/markup] Error 1
make[1]: *** [demos/CMakeFiles/markup.dir/all] Error 2
make: *** [all] Error 2
rougier commented 10 months ago

Thanks for the report and the identification of the problem. Not sure why it was reported earlier and I don't remember why I merged the initial commit. Could you make a PR?

wzhqwq commented 10 months ago

I tried it in a linux environment where the original version works fine but the modified version inexplicably fails. I'm using Mac where things go oppositely. It might be right not to change it.