【问题标题】:Error: Cannot find 'freetype6.dll'错误:找不到“freetype6.dll”
【发布时间】:2017-12-22 15:53:35
【问题描述】:

最近我在使用 MonoGame 内容管道工具时遇到了一些问题,无法加载纹理。错误消息说找不到“freeimage.dll”。我查看了 MonoGame 论坛的解决方案,最终下载了 64 位版本的 Visual C++ Redistributable Package 2012。这解决了我的问题,内容管道可以再次加载 .png 文件。现在管道工具在加载 .spritefont 文件时遇到问题。它说它缺少“freetype.dll”。所有这些丢失的 .dll 文件是怎么回事?我刚刚下载了 VC++ Redistributable Package,但它只修复了纹理,而不是字体。


更新:

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

【问题讨论】:

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


    【解决方案1】:

    根据 Monogame 中的bug report 5736,他们链接到 2012 可再发行组件(在短时间内无法下载)是一个问题。

    您可以尝试通过自己编译 freetype6 来尝试自己修复它,按照错误报告中的说明(如下),或者您可以在修复 bug 4485 时等待他们修复问题(这似乎解决了更大的问题与他们的依赖链),或者你可以看看新的重新分发是否修复它。

    ...

    尝试下载 VC++ 2012 Update 4 Redistributable:
    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 工作正常。

    【讨论】:

    • 谢谢,VC++ 2012 Update 4 在 MonoGame 3.7.1 上为我修复了它(无需从源代码构建)
    • 安装 VC++ 2012(或 2013 或 2015)对我不起作用。有人有其他想法吗?我已经安装了我使用的字体。 FreeType6.dll 与 mgcb.exe 位于同一文件夹中。只要我在没有内容文件的情况下打开它,然后从工具内打开内容文件,我的 mgcb 构建工具就可以很好地构建它。如果我双击内容文件,它会打开 mgcb 并且我可以看到内容树,但是单击构建按钮绝对不会执行任何操作(屏幕保持空白,没有错误,就像我没有单击一样)。当我在 VS 中构建时,我得到错误 mgcb exited with code -532462766.
    • @SebastiaanHoedeman - 也许您应该尝试 2019 和 2022 运行时。也许他们又更新了。 docs.microsoft.com/en-us/cpp/windows/…
    • @antiduh 感谢您的评论。我已经安装了 2015-2022 版本(那里应该更清楚一点),所以不幸的是这没有帮助。我觉得奇怪的是,当从应用程序中打开 MGCB 应用程序时,它确实在 MGCB 应用程序中构建,当双击内容文件打开它时,它不会构建。我觉得问题出在某个地方......我创建了一个问题,我在其中解释得更好:stackoverflow.com/questions/70825340/…
    【解决方案2】:

    为 Visual Studio 2013 下载和安装 Visual C++ Redistributable Packages 对我有用。

    【讨论】:

      猜你喜欢
      • 2017-09-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-02-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多