windmc
Compile Windows drivers from INF files
SYNOPSIS
windmc [options] <input.mc>
PARAMETERS
-h <dir>
Specifies the directory where the generated C/C++ header file (.h) should be placed.
-r <dir>
Specifies the directory where the generated resource script file (.rc) should be placed.
-x <dir>
Specifies the directory for the generated RC file. This option is considered deprecated and superseded by -r.
-c
Generates C-style names for message constants in the output header file.
-s
Generates an MC stub, typically a C/C++ source file for message formatting or error reporting.
-p <prefix>
Adds a specified prefix to all generated symbols (e.g., message IDs and function names).
-v
Enables verbose output, providing more detailed information during the compilation process.
-W<level>
Sets the warning level (0-3), controlling the verbosity and strictness of warning messages. 0 suppresses warnings, 3 shows all warnings.
--version
Displays the windmc version information and exits.
--help
Displays a help message with usage instructions and available options, then exits.
DESCRIPTION
windmc is the Wine Message Compiler, a utility within the Wine development toolkit designed to process message definition files (.mc files) typically used in Windows application development. Its primary function is to generate corresponding C/C++ header files (.h) and resource script files (.rc) from these .mc inputs.
These generated files are crucial for internationalization and localization, defining unique message IDs, their symbolic names, severity, and default message text. The .h files provide symbolic constants for message IDs, while the .rc files embed the message strings into an application's resources. windmc allows developers to compile Windows-specific message resources on non-Windows platforms (like Linux) as part of the Wine project's effort to provide compatible development tools for cross-compilation or building applications intended to run under Wine.
CAVEATS
windmc is specifically designed for compiling Windows message definition files within the Wine ecosystem. It does not compile generic Linux message files (e.g., for gettext). Its utility is primarily for developers working with Windows applications or components that are intended to run under Wine, or for building Wine itself.
ROLE IN CROSS-COMPILATION
windmc plays a vital role in cross-compilation environments, allowing developers on Linux or other Unix-like systems to build Windows executables and libraries that include message resources. This capability is essential for projects that need to maintain a single codebase for both Windows and non-Windows targets, or for Wine developers themselves who need to compile Windows-specific components of Wine.
MESSAGE DEFINITION FILES (.MC)
The input .mc files are text files that define event messages, their severity, categories, and associated string values. These files are standard in Windows development for internationalization, especially for event logging and providing localized string resources for user interfaces. windmc parses this specialized format to generate the necessary C/C++ headers and resource scripts.
HISTORY
windmc is an integral component of the Wine project, which began in 1993 with the goal of allowing Windows applications to run on Unix-like operating systems. As part of this effort, Wine provides its own implementations of various Microsoft development tools, including a message compiler, to enable the compilation and cross-compilation of Windows source code. windmc was developed to provide compatibility with Microsoft's message compiler (MC.exe), ensuring that Windows resource compilation processes can be replicated on non-Windows platforms, crucial for building Wine itself and for developers creating or porting Windows applications.
SEE ALSO
wine(1), wrc(1), widl(1), winedbg(1)