错误:无法找到' freetype6.dll'

时间:2017-12-22 15:53:36

标签: c# visual-c++ monogame visual-c++-2012 content-pipeline

最近我在MonoGame内容管道工具上遇到了一些麻烦,没有加载纹理。错误消息说' freeimage.dll'无法找到。我检查了MonoGame论坛的解决方案并最终下载了64位版本的Visual C ++ Redistributable Package 2012.这解决了我的问题,内容管道可以再次加载.png文件。现在管道工具正在加载.spritefont文件。它说它缺少了#freetype.dll'。与所有这些丢失的.dll文件的交易是什么?我刚下载了VC ++ Redistributable Package,但它只修复了纹理,而不是字体。

更新

我尝试下载Visual C ++ Redistributable Package 2017.但是,问题仍然存在......

2 个答案:

答案 0 :(得分:1)

根据Monogame中的bug report 5736,这是他们与2012年可再发行产品(暂时无法下载)链接的问题。

您可以按照错误报告(如下)中的说明,通过自己编译freetype6来尝试自己修复它,或者在bug 4485被修复后,可以等待他们修复问题(看来可以解决该问题)。他们的依赖链存在较大的问题),或者您可以查看更新的redistrib是否可以解决此问题。

...

尝试下载VC ++ 2012 Update 4可再发行组件:
https://www.microsoft.com/en-us/download/details.aspx?id=30679

或者尝试自己编译freetype6:

  

mdrejhon于2017年5月25日发表评论•

     

尤里卡!我自己重新编译了FreeType并解决了这个问题。

     

我只需要遵循这些说明的修改版本:   Compiling FreeType to DLL (as opposed to static library)

Download latest FreeType 2.8 from https://www.freetype.org/download.html
Using VS2015 or VS2017, open freetype.sln from the builds\win32\vc2010 directory
Modify solution to target x64 instead of x86
Modify solution to Configuration Type of DLL instead of LIB
Edit ftoption.h to add two lines at top
#define FT_EXPORT(x) __declspec(dllexport) x
#define FT_BASE(x) __declspec(dllexport) x
Change project config to Release
Build.
You will see warnings, but compile succeeds.
You will have a file "freetype28.dll" (for FreeType 2.8)
Rename this file to "freetype6.dll" and copy to C:\Program Files (x86)\MSBuild\MonoGame\v3.0\Tools
(replacing the original freetype6.dll located there)
     

静态链接到2015或2017可以正常工作。

答案 1 :(得分:0)

下载和安装Visual Studio 2013的Visual C ++可再发行组件包对我来说很有效。