rougier / freetype-gl

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

FT_Error_String redefinition on static link with freetype_s #244

Closed namaenonaimumei closed 3 years ago

namaenonaimumei commented 3 years ago

Issue happens when linking together freetype-gl and freetype_s libraries.

Probably regression introduced in cf8c572, since commits before that work fine. Currently changing internal name to something like FTGL_Error_String() works, but not really sure what is being achieved in that code scope, since to me it makes no sense other than placeholder (always returns ERROR_UNKNOWN). Since I wasn't sure about reason for current state of FT_Error_String(), not creating pr for this one - for now renaming function works as workaround. Not sure why not to use FT_Error_String() provided by freetype directly.

Error itself probably didn't happen when dynamically loading library, but only tested with slib.

Error with MSVC under Windows with vc142.

rougier commented 3 years ago

Is it fixed with the patch you sent (and that has been merged)?

namaenonaimumei commented 3 years ago

I wasn't sure whether it was worked on, since last commit around it looked unfinished. If you would be fine with it I could refactor FT_Error_String() to actually wrap around freetype's own implementation instead, since current version doesn't do anything.

Just noticed, that by mistake I submitted changed FTGL_Error_String() in already merged PR, so it no longer clashes with freetype_s in current master.

namaenonaimumei commented 3 years ago

This has been fixed with pr above. Forgot to close the issue.