gpt4 book ai didi

c++ - 异常 Unresolved external symbol 错误

转载 作者:塔克拉玛干 更新时间:2023-11-03 07:29:06 26 4
gpt4 key购买 nike

我有一个项目,过去使用 freetype 库编译得很好。

从那时起,我的操作系统被重新安装,因此 Visual Studio 2010 也被重新安装。

我已经重新包含并重新安装了所有 .lib .dll 和头文件。出于某种原因,如果我现在使用发布配置运行程序,它运行得很好。但是,如果我切换到调试配置,它会在 freetype 库函数上给出来自链接器的 Unresolved external symbol 错误。

现在我可以确定我的两种配置的 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)

编辑:好的,这很奇怪。我已经从发布配置中的包含和库目录设置中删除了 ALL 的 freetype 目录信息,以及其他依赖项。发布的配置版本仍然有效!

这让我相信移动我的文件会丢失一些东西(相对于配置)。

最佳答案

我遇到了同样的问题。

我通过为 x64 平台(或 win32 如果你使用它)。

您将获得该平台的.libs

关于c++ - 异常 Unresolved external symbol 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14734530/

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