异常未解决的外部符号错误

Abnormal unresolved external symbol error

本文关键字:符号 错误 外部 未解决 异常      更新时间:2023-10-16

我有一个项目,它曾经使用freetype库进行很好的编译。

从那以后,我的操作系统被重新安装了,因此Visual Studio 2010也是如此。

我已经重新包含并重新安装了所有 .lib .dll和头文件。出于某种原因,现在如果我使用发布配置运行该程序,它可以运行良好。但是,如果我切换到调试配置,它会在自由类型库函数上从链接器中给我未解决的外部符号错误。

现在,我确定两种配置的C++目录是相同的,因为我使用解决方案设置中的"所有配置"选项卡重新设置它们。除此之外,两种配置"附加目录/附加依赖项设置"也是如此,以相同的方式设置。

我能在项目文件夹中的发布和调试文件夹之间找到的唯一区别是调试文件夹中存在一个名为"vc100.idb"的文件,这是一个最小的重建依赖项文件。这看起来很有希望,但删除它没有产生任何结果,所以我把它放回去。

您是否知道可能导致编译配置之间出现这种差异的原因?

最糟糕的是,我可以继续在发布配置上编程,但我宁愿不继续走这条路,因为我真的很想知道这个问题的根源。

提前感谢,

家伙

错误:

1>freetype.obj : error LNK2019: unresolved external symbol _FT_Glyph_To_Bitmap referenced in function "void __cdecl freetype::make_dlist(struct FT_FaceRec_ *,char,unsigned int,unsigned int *)" (?make_dlist@freetype@@YAXPAUFT_FaceRec_@@DIPAI@Z)
1>freetype.obj : error LNK2019: unresolved external symbol _FT_Get_Glyph referenced in function "void __cdecl freetype::make_dlist(struct FT_FaceRec_ *,char,unsigned int,unsigned int *)" (?make_dlist@freetype@@YAXPAUFT_FaceRec_@@DIPAI@Z)
1>freetype.obj : error LNK2019: unresolved external symbol _FT_Load_Glyph referenced in function "void __cdecl freetype::make_dlist(struct FT_FaceRec_ *,char,unsigned int,unsigned int *)" (?make_dlist@freetype@@YAXPAUFT_FaceRec_@@DIPAI@Z)
1>freetype.obj : error LNK2019: unresolved external symbol _FT_Get_Char_Index referenced in function "void __cdecl freetype::make_dlist(struct FT_FaceRec_ *,char,unsigned int,unsigned int *)" (?make_dlist@freetype@@YAXPAUFT_FaceRec_@@DIPAI@Z)
1>freetype.obj : error LNK2019: unresolved external symbol _FT_Done_FreeType referenced in function "public: void __thiscall freetype::font_data::init(char const *,unsigned int)" (?init@font_data@freetype@@QAEXPBDI@Z)
1>freetype.obj : error LNK2019: unresolved external symbol _FT_Done_Face referenced in function "public: void __thiscall freetype::font_data::init(char const *,unsigned int)" (?init@font_data@freetype@@QAEXPBDI@Z)
1>freetype.obj : error LNK2019: unresolved external symbol _FT_Set_Char_Size referenced in function "public: void __thiscall freetype::font_data::init(char const *,unsigned int)" (?init@font_data@freetype@@QAEXPBDI@Z)
1>freetype.obj : error LNK2019: unresolved external symbol _FT_New_Face referenced in function "public: void __thiscall freetype::font_data::init(char const *,unsigned int)" (?init@font_data@freetype@@QAEXPBDI@Z)
1>freetype.obj : error LNK2019: unresolved external symbol _FT_Init_FreeType referenced in function "public: void __thiscall freetype::font_data::init(char const *,unsigned int)" (?init@font_data@freetype@@QAEXPBDI@Z)

编辑:好吧,这很奇怪。我已经删除了发布配置中的所有自由类型目录信息,包括包含和库目录设置,以及其他依赖项。并且发布的配置版本仍然有效!

这让我相信移动我的文件缺少一些东西(相对于配置方面(。

我遇到了同样的问题。

我通过编译x64平台的freetype(freetype-2.5.2\builds\windows\vc2010\freetype.sln(解决方案(如果您使用它,则win32(解决了它。

您将获得此平台的.libs

相关文章: