天天看点

wxWidgets的编译选项

From WxWiki

All build configurations represent pre-configured settings for building wxWidgets in either ANSI or Unicode mode, Debug or Release, Static or Dynamic libraries, as well as separate configurations for building either wxMSW or wxUniversal. Each one of these will result in different libraries being built in different file locations. Here's a brief explanation of each of these modes:

wxWidgets的所有编译配置有:ANSI或Unicode,Debug或Release,Dynamic或Static库,以及单独配置的编译选项wxmsw或wxuniversal。每个不同的设置都会是在不同的文件位置生成库文件。以下是对这些模式的简单的解释:

ANSI/Unicode

If building with Unicode support, wxWidgets will use Unicode strings with all components, and will automatically set the type of all literal strings properly wrapped with the string translation functions [_T(""), _(""), wxT("")] as wide character Unicode strings. See the Unicode Overview for more information.

如果选择支持Unicode的建设,wxWidgets的所有组件将使用Unicode字符串,它会自动设置所有文字字符串类型的字符串翻译函数[_T(“”),_(“”),wxT(“”)作为宽字符的 Unicode字符串。有关更多信息,请参阅Unicode概述。

Debug/Release

Building in debug mode will result in libraries with debug symbols (useful when using a debugger) as well turn on the functionality of

 all helpful debugging functions and macros and prompt the user upon reaching assertions. You will almost always have a need for

both debug and release configurations. See the Debugging Overview for more information.

这个就不用详细解释了吧。

Static or Dynamic

Unless a configurations is labeled with "DLL", it is a static library configuration. Static libraries are linked directly into your program's executable when compiled while dynamic libraries are released as separate DLL files that your program links to dynamically at runtime.

If you are unsure about which to use, build the static libraries.

静态和动态:如果一个配置没有包含“DLL”字样,那就是一个静态lib的配置。静态库会在编译过程中,将直接链接到你的执行程序中。而动态库则是一个独立的DLL文件,只会在运行时被动态链接。如果你不能确定使用哪个,建议用静态库。

Universal

This is a port of wxWidgets(also referred to as "wxUniversal") which implements the various GUI controls by drawing them itself (using low level wxWidgets classes). It is implemented on most platforms and will result in your program looking identical on all platforms much like using Java or GTK+. Most wxWidgets users use wxWidgets because of its ability to build native looking applications, so this is rarely used, rarely worked on, and only implements a small subset of the wxWidgets library. Do not use Universal configurations unless you know what you are doing. See the docs/univ/readme.txt file for more information.

这是一个wxWidgets的移植(也称为为“wxUniversal”),它会用各种原生的GUI Controls来绘制自己(使用底层wxWidgets类)中实现的各种GUI控件。它已在大多数平台上实现,使你的程序在所有平台上外观相同的,就像使用Java或GTK +。大多数wxWidgets的用户使用wxWidgets的原因是,因为它可以构建自然的外观(平台自适应)的程序,所以很少使用(wxUniversal)。而且它也只实现wxWidgets库的一小部分。建议不要使用Universal的配置,除非你知道你在做什么。详情参见DOCS /univ/ readme.txt。

PS:universal的好处在于可以精确控制控件外观。另外移植到嵌入式系统很方便。

继续阅读