wxWidgets 创建的DLL不能调试

这是wxWidgets论坛的中文版本。在这里,您可以用您的母语汉语讨论上面任一子论坛所涉及的所有关于wxWidgets的话题。欢迎大家参与到对有价值的帖子的中英互译工作中来!
Post Reply
soarf
In need of some credit
In need of some credit
Posts: 4
Joined: Mon Mar 09, 2009 8:33 am

wxWidgets 创建的DLL不能调试

Post by soarf » Mon Mar 09, 2009 9:36 am

我用wxWidgets(2.87)创建了一个DLL, 运行无误, 但调试时弹出"User breakpoint called from code at 0x7c921230"框, 光标停在"7C921230 int 3"处...
DllMain代码如下:
bool APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
{ //use wxInitialize() if you don't want GUI instead of the following 12 lines
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
wxSetInstance((HINSTANCE)hModule);
int argc = 0;
char **argv = NULL;
wxEntryStart(argc, argv);
if ( !wxTheApp || !wxTheApp->CallOnInit() )
return FALSE;
}
break;

case DLL_THREAD_ATTACH:
break;

case DLL_THREAD_DETACH:
break;

case DLL_PROCESS_DETACH:
wxEntryCleanup(); //use wxUninitialize() if you don't want GUI
break;
}
return TRUE;
}
追踪至wxEntryStart(argc, argv);时出现此错误码...
不知何故, 请高手赐教!

hats
Experienced Solver
Experienced Solver
Posts: 70
Joined: Wed Sep 16, 2009 3:50 pm
Location: China
Contact:

Post by hats » Tue Oct 06, 2009 1:51 pm

我是菜鸟,我想在dll中使用wxWidgets.搞了好多天还是不行。
能不能把代码发一下?让我们学习学习。

ccnyou
Knows some wx things
Knows some wx things
Posts: 33
Joined: Fri Sep 28, 2012 8:08 am

Re: wxWidgets 创建的DLL不能调试

Post by ccnyou » Wed Nov 27, 2013 5:38 pm

请使用debug模式编译wxwdigets

Post Reply