wxWidgets的debug模式的一个链接异常

本文介绍了如何解决在使用wxWidgets库时遇到的未解析外部符号错误。通过在源代码中手动实现缺失的函数来规避此问题,确保了项目的顺利编译。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

To use it, add the following include path:
D:/apps/wxWidgets-2.8.4/include/msvc
D:/apps/wxWidgets-2.8.4/include
add the following library path:
D:/apps/wxWidgets-2.8.4/lib/vc_lib

 

wxmsw28d_core.lib(appcmn.obj) : error LNK2001: unresolved external symbol "protected: virtual class wxString __thiscall wxAppTraitsBase::GetAssertStackTrace(void)" (?GetAssertStackTrace@wxAppTraitsBase@@MAE?AVwxString@@XZ)
Google does not help me on this. So I overcome it in this way:
in one cpp file
#include <wx/apptrait.h>
#if wxUSE_STACKWALKER && defined( __WXDEBUG__ )
// silly workaround for the link error with debug configuration:
// /src/common/appbase.cpp
wxString wxAppTraitsBase::GetAssertStackTrace()
{
   return wxT("");
}
#endif

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值