WxWindows/WxWidgets中各个库之间的关系

本文详细介绍了wxWidgets项目中各个库的功能及用途,包括基础GUI组件、高级用户界面、网络访问类、多媒体支持等,为开发者提供了全面的技术指南。

 

wxAui

This contains the Advanced User Interface docking library.

wxBase

Every wxWidgets application must link against this library. It contains mandatory classes that any wxWidgets code depends on (e.g. wxString) and portability classes that abstract differences between platforms. wxBase can be used to develop console mode applications, it does not require any GUI libraries or running X Window System on Unix.

wxNet

Classes for network access:

 

wxRichText

This contains generic rich text control functionality.

wxXML

This library contains simple classes for parsing XML documents. Note that their API will change in the future and backward compatibility will not be preserved. Use of this library in your applications is not recommended, it is only meant for use by XML resources system. Future versions of wxWidgets will contain new XML handling classes with DOM-like API. Requires wxBase.

wxCore

Basic GUI classes such as GDI classes or controls are in this library. All wxWidgets GUI applications must link against this library, only console mode applications don't.

wxAdvanced

Advanced or rarely used GUI classes:

 

Requires wxCore and wxBase.

wxMedia

Miscellaneous classes related to multimedia. Currently this library only contains wxMediaCtrl but more classes will be added in the future.

Requires wxCore and wxBase.

wxGL

This library contains wxGLCanvas class for integrating OpenGL library with wxWidgets. Unlike all others, this library is not part of the monolithic library, it is always built as separate library. Requires wxCore and wxBase.

wxHTML

Simple HTML renderer and other HTML rendering classes are contained in this library, as well as wxHtmlHelpController, wxBestHelpController and wxHtmlListBox. Requires wxCore and wxBase.

wxODBC

Database classes. Requires wxBase.

wxQA

This is the library containing extra classes for quality assurance. Currently it only contains wxDebugReport and related classes, but more will be added to it in the future.

Requires wxCore, wxBase and wxXML.

wxDbGrid

wxDbGridTableBase class which combines wxGrid and wxDbTable. Requires wxODBC and wxAdvanced.

wxXRC

This library contains wxXmlResource class that provides access to XML resource files in XRC format. Requires wxXML, wxCore, wxAdvanced and wxHTML.

为了获取适用于 **Visual Studio 2022** 的 **wxWidgets** 文件,可以通过以下几种方式进行操作: ### 下载预编译的 wxWidgets 文件 1. **官方资源与第三方镜像** 可以访问 [wxWidgets 官方网站](https://www.wxwidgets.org/downloads/) 查看是否有适用于 Microsoft Visual C++ 2022 的预编译版本。此外,一些第三方平台如 [SourceForge](https://sourceforge.net/projects/wxwindows/files/) 或 GitHub 镜像仓也可能提供对应版本的二进制包。 2. **GitCode 镜像项目** 类似于提到的 [wxwidgets-vscode 项目地址](https://gitcode.com/gh_mirrors/wx/wxwidgets-vscode),可以尝试在 GitCode 或其他代码托管平台上搜索是否有人提供针对 Visual Studio 2022 编译好的 wxWidgets 二进制文件[^1]。 ### 自行编译 wxWidgets(推荐) 由于不同项目可能需要不同的配置(如 Unicode 支持、调试/发布模式等),建议自行编译以确保兼容性。 #### 编译步骤概述: 1. **下载源码** 从 [wxWidgets 官网](https://www.wxwidgets.org/downloads/) 下载最新稳定版源码包。 2. **设置开发环境** 安装 **Visual Studio 2022 Community Edition** 或其他版本,并确保安装了 C++ 开发组件。 3. **配置编译环境变量** 在命令提示符中进入 `wxWidgets` 源码目录下的 `build\msw` 文件夹: ```bash cd path\to\wxWidgets-3.2.x\build\msw ``` 4. **运行 nmake 命令进行编译** 示例:使用 Unicode 调试和发布版本进行编译: ```bash nmake -f makefile.vc BUILD=debug SHARED=1 nmake -f makefile.vc BUILD=release SHARED=1 ``` 其中 `SHARED=1` 表示生成动态链接(DLL)[^3]。 5. **配置项目中的包含路径与路径** 在 Visual Studio 2022 中打开你的项目,进入“项目属性” -> “C/C++” -> “常规”,在“附加包含目录”中添加: ``` $(WINWX)\include $(WINWX)\include\msvc ``` 然后在“链接器” -> “常规” -> “附加目录”中添加文件路径,并在“输入”中添加所需的 wxWidgets 名称,例如 `wxbase32u.lib` 和 `wxmsw32u_core.lib` 等[^3]。 --- ###
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值