https://www.wxwidgets.org/downloads/
打开SLN工程
D:\CPPLibs\wxWidgets-3.1.0\build\msw\wx_vc14.sln
编译
DLL Debug
DLL Release
新建空Win32项目
创建一个空的main.cpp文件到工程
工程属性里加入include目录
D:\CPPLibs\wxWidgets-3.1.0\include
D:\CPPLibs\wxWidgets-3.1.0\include\msvc
及Lib目录
D:\CPPLibs\wxWidgets-3.1.0\lib\vc_dll
Link里加入lib
Debug >>>>>
wxmsw31ud_core.lib
wxbase31ud.lib
wxpngd.lib
wxzlibd.lib
wxjpegd.lib
Release >>>>>
wxmsw31u_core.lib
wxbase31u.lib
wxpng.lib
wxzlib.lib
wxjpeg.lib
写入测试代码
#define __WXMSW__ #define WXUSINGDLL #include <wx/wx.h> class Simple : public wxFrame { public: Simple(const wxString& title); }; Simple::Simple(const wxString& title) : wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(250, 150)) { Centre(); } class MyApp : public wxApp { public: virtual bool OnInit(); }; IMPLEMENT_APP(MyApp) bool MyApp::OnInit() { Simple *simple = new Simple(wxT("I am title")); simple->Show(true); return true; }
效果
参考
Win7 VS2015编译wxWidgets-3.1.0
,