如何在dll中使用wxWidgets?在线等!!
如何在dll中使用wxWidgets?在线等!!
我用wxDev-C++新建了一个dll工程,不知道怎样在其中使用wxWidgets。我要在dll中使用对话框。我看了论坛的相关话题,他们都是用VC做的,我编译不过。哪位大哥给个简单的例子??能在wxDev-C++下编译通过的!这个问题困扰我好几天了,急用!!知道的请帮助一下!
Re: 如何在dll中使用wxWidgets?在线等!!
参考 samples\dll
在DLL中使用wx,还是需要提供是一个wxApp。可以这样写一个
/*---------------------------------------------------------------------------
dawnwxApp
-----------------------------------------------------------------------------*/
class dawnwxApp : public wxApp {
public:
virtual bool OnInit() { return true; }
};
DECLARE_APP(dawnwxApp)
IMPLEMENT_APP(dawnwxApp)
struct __INIT_DAWN__{
__INIT_DAWN__() {
wxInitialize();
}
~__INIT_DAWN__() {
wxUninitialize();
}
}__INIT_DAWN__x; // initialization
就搞定了,更详尽的得去看大牛们的贴子,区分多种情况,如GUI,或是只初始化不运行等。
http://forums.wxwidgets.org/viewtopic.p ... c&start=21
http://stackoverflow.com/questions/2083 ... tering-the
http://wiki.wxwidgets.org/Creating_A_DL ... pplication
在DLL中使用wx,还是需要提供是一个wxApp。可以这样写一个
/*---------------------------------------------------------------------------
dawnwxApp
-----------------------------------------------------------------------------*/
class dawnwxApp : public wxApp {
public:
virtual bool OnInit() { return true; }
};
DECLARE_APP(dawnwxApp)
IMPLEMENT_APP(dawnwxApp)
struct __INIT_DAWN__{
__INIT_DAWN__() {
wxInitialize();
}
~__INIT_DAWN__() {
wxUninitialize();
}
}__INIT_DAWN__x; // initialization
就搞定了,更详尽的得去看大牛们的贴子,区分多种情况,如GUI,或是只初始化不运行等。
http://forums.wxwidgets.org/viewtopic.p ... c&start=21
http://stackoverflow.com/questions/2083 ... tering-the
http://wiki.wxwidgets.org/Creating_A_DL ... pplication