VS2013 编译freetype2.6.5

时间:2022-06-01 20:15:23

编译freetype2.6.5

起因

昨天同步了obs-studio的代码,一直编译不过,freetype一直找不到符号。

1>------ Build started: Project: text-freetype2, Configuration: Debug x64 ------
2>------ Build started: Project: vlc-video, Configuration: Debug x64 ------
1>  find-font.c
2>  vlc-video-plugin.c
1>  find-font-windows.c
2>e:\daobo\20160722\cs_dingdong\obs-studio\plugins\vlc-video\vlc-video-plugin.h(2): fatal error C1083: Cannot open include file: 'libvlc.h': No such file or directory
2>  vlc-video-source.c
2>e:\daobo\20160722\cs_dingdong\obs-studio\plugins\vlc-video\vlc-video-plugin.h(2): fatal error C1083: Cannot open include file: 'libvlc.h': No such file or directory
2>  Generating Code...
1>  text-functionality.c
1>  text-freetype2.c
1>  Generating Code...
1>    Creating library E:/DaoBo/20160722/cs_dingdong/obs-studio/build/plugins/text-freetype2/Debug/text-freetype2.lib and object E:/DaoBo/20160722/cs_dingdong/obs-studio/build/plugins/text-freetype2/Debug/text-freetype2.exp
1>find-font.obj : error LNK2019: unresolved external symbol FT_Get_Sfnt_Name_Count referenced in function build_font_path_info
1>find-font.obj : error LNK2019: unresolved external symbol FT_Get_Sfnt_Name referenced in function build_font_path_info
1>find-font-windows.obj : error LNK2019: unresolved external symbol FT_New_Face referenced in function load_os_font_list
1>text-freetype2.obj : error LNK2001: unresolved external symbol FT_New_Face
1>find-font-windows.obj : error LNK2019: unresolved external symbol FT_Done_Face referenced in function load_os_font_list
1>text-freetype2.obj : error LNK2001: unresolved external symbol FT_Done_Face
1>text-functionality.obj : error LNK2019: unresolved external symbol FT_Load_Glyph referenced in function get_ft2_text_width
1>text-functionality.obj : error LNK2019: unresolved external symbol FT_Render_Glyph referenced in function cache_glyphs
1>text-functionality.obj : error LNK2019: unresolved external symbol FT_Get_Char_Index referenced in function get_ft2_text_width
1>text-freetype2.obj : error LNK2019: unresolved external symbol FT_Init_FreeType referenced in function obs_module_load
1>text-freetype2.obj : error LNK2019: unresolved external symbol FT_Done_FreeType referenced in function obs_module_unload
1>text-freetype2.obj : error LNK2019: unresolved external symbol FT_Set_Pixel_Sizes referenced in function obs_current_module
1>text-freetype2.obj : error LNK2019: unresolved external symbol FT_Select_Charmap referenced in function obs_current_module
1>E:\DaoBo\20160722\cs_dingdong\obs-studio\build\plugins\text-freetype2\Debug\text-freetype2.dll : fatal error LNK1120: 11 unresolved externals
3>------ Skipped Build: Project: INSTALL, Configuration: Debug x64 ------
3>Project not selected to build for this solution configuration
4>------ Skipped Build: Project: PACKAGE, Configuration: Debug x64 ------
4>Project not selected to build for this solution configuration
========== Build: 0 succeeded, 2 failed, 32 up-to-date, 2 skipped ==========

2 新版

原来是用了最新版的2.6.5的freetype,之前的2.4.6的都不行。

下载(地址) [http://download.savannah.gnu.org/releases/freetype/]
freetype2和fft2build的路径都为 E:\DaoBo\20160722\cs_dingdong\freetype\freetype-2.6.5\include
freetype库的路径为 E:\DaoBo\20160722\cs_dingdong\freetype\freetype-2.6.5\objs\vc2010\x64\freetype265d.lib