gpt4 book ai didi

c# - 错误 : Cannot find 'freetype6.dll'

转载 作者:行者123 更新时间:2023-11-30 16:41:51 27 4
gpt4 key购买 nike

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


更新:

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

最佳答案

根据 bug report 5736在 Monogame 中,它们与 2012 年可再发行版(在短时间内无法下载)的链接存在问题。

您可以尝试自己编译 freetype6 来修复它,按照错误报告(如下)中的说明进行操作,或者您可以等待他们在 bug 4485 时修复问题。已修复(这似乎解决了其依赖链的更大问题),或者您可以查看较新的 redistrib 是否修复了它。

...

尝试下载 VC++ 2012 Update 4 Redistributable:
https://www.microsoft.com/en-us/download/details.aspx?id=30679

或者尝试自己编译 freetype6:

mdrejhon commented on May 25, 2017 •

Eureka! I recompiled FreeType myself and solved this problem.

I only needed to follow a modified version of these instructions: 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)

Statically linked to 2015 or 2017 works fine.

关于c# - 错误 : Cannot find 'freetype6.dll' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47944166/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com