异常未解决的外部符号错误
Abnormal unresolved external symbol error
我有一个项目,它曾经使用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
。
相关文章:
- 在C++中使用内联方法时出现未定义的符号错误
- 当 lib 已添加到其他依赖项时,如何在 VS 中调试未解析的外部符号错误
- 函数指针给我"重新声明为不同类型的符号"错误
- "byte":使用Crypto++和Windows SDK时出现不明确的符号错误
- 函数路径追加上未解决的外部符号错误
- 作为成员的静态类模板实例会导致未解析的外部符号错误
- C++ XCODE ld:找不到体系结构x86_64 clang 的符号:错误:链接器命令失败,退出代码为 1(使用 -
- 共享库中使用"使用命名空间"定义的符号错误
- 在FreesWitch中使用AWS C SDK加载模块时未定义的符号错误
- 在 Mac 上C++编译代码时处理“dyld:惰性符号绑定失败:找不到符号”错误
- C++编译错误LNK2019:未解决的外部符号错误
- VTK / ITK/ QT - 未解决的外部符号错误 (LNK2001)
- QT创建者:简单程序未解决的外部符号和外部符号错误
- C++编译错误:ld:找不到体系结构x86_64 clang 的符号:错误:链接器命令失败,退出代码为 1(使用 -v
- 标准::字符串::空的未定义符号错误;Mac OS High Sierra 上的 c++ 标准方法链接错误
- ld:找不到体系结构x86_64 clang 的符号:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
- 由于使用未签名的INT,因此在Variadic模板C 上未解决的外部符号错误
- OSX MOJAVE -LD:架构X86_64 clang找不到符号:错误:链接器命令失败,出口代码1
- 使用从WINRT网格类派生的抽象类时,Casttobase未解决的外部符号错误
- LD:架构x86_64 clang找不到符号:错误:链接器命令失败,出口代码1(使用-v to See