widl1
Wine interface definition language (idl) compiler
Usage
widl [options]
IDL_file
widl [options]
--dlldata-only
name1
[name2 ...]
Overview
When no options are used the program will generate a header file, and possibly client and server stubs, proxy and dlldata files, a typelib, and a UUID file, depending on the contents of the IDL file. If any of the options -c, -h, -p, -s, -t, -u or --local-stubs is given, widl will only generate the requested files, and no others. When run with --dlldata-only, widl will only generate a dlldata file, and it will contain a list of the names passed as arguments. Usually the way this file is updated is that each time widl is run, it reads any existing dlldata file, and if necessary regenerates it with the same list of names, but with the present proxy file included.
When run without any arguments, widl will print a help message.
Options
General options:
-
-V -
Print version number and exit.
-
-o, --output=name -
Set the name of the output file. When generating multiple output files, this sets only the base name of the file; the respective output files are then named name.h, name_p.c, etc. If a full file name with extension is specified, only that file is generated.
-
-b, --target=cpu-manufacturer[-kernel]-os -
Set the target architecture when cross-compiling. The target specification is in the standard autoconf format as returned by
config.sub.
-
-m32, -m64, --win32, --win64 -
Force the target architecture to 32-bit or 64-bit.
-
--sysroot=dir -
Prefix the standard include paths with dir.
-
--nostdinc -
Do not search standard include paths like /usr/include and /usr/local/include.
Header options:
-
-h -
Generate header files. The default output filename is infile
.h.
-
--oldnames -
Use old naming conventions.
Type library options:
-
-t -
Generate a type library. The default output filename is infile
.tlb. If the output file name ends in.res, a binary resource file containing the type library is generated instead.
-
-L path -
Add a directory to the library search path for imported typelibs. The option can be specified multiple times.
-
--oldtlb -
Generate a type library in the old format (SLTG format).
UUID file options:
-
-u -
Generate a UUID file. The default output filename is infile
_i.c.
Proxy/stub generation options:
-
--align=n, --packing=n -
Set the structure packing to n. Supported values are 2, 4, and 8.
-
-c -
Generate a client stub file. The default output filename is infile
_c.c.
-
-Os -
Generate inline stubs.
-
-Oi -
Generate old-style interpreted stubs.
-
-Oif, -Oic, -Oicf -
Generate new-style fully interpreted stubs. This is the default.
-
-p -
Generate a proxy. The default output filename is infile
_p.c.
-
--prefix-all=prefix -
Prefix to put on the name of both client and server stubs.
-
--prefix-client=prefix -
Prefix to put on the name of client stubs.
-
--prefix-server=prefix -
Prefix to put on the name of server stubs.
-
-s -
Generate a server stub file. The default output filename is infile
_s.c.
-
--winrt -
Enable Windows Runtime mode.
-
--ns_prefix -
Prefix namespaces with ABI namespace.
Registration script options:
-
-r -
Generate a registration script. The default output filename is infile
_r.rgs. If the output file name ends in.res, a binary resource file containing the script is generated instead.
Dlldata file options:
--dlldata-onlyname1 [name2...]-
Regenerate the dlldata file from scratch using the specified proxy names. The default output filename is
dlldata.c.
Metadata file options:
-
--winmd -
Generate a Windows Runtime Metadata file. This implies the
--winrtmode. The default output filename is infile.winmd.
Preprocessor options:
-
-I path -
Add a directory to the include search path. Multiple include directories are allowed.
-
-D id[=val] -
Define preprocessor macro id with value val.
-
-E -
Preprocess only.
-
-N -
Do not preprocess input.
Debug options:
-
-W -
Enable pedantic warnings.
-
-d n -
Set debug level to the non negative integer n. If prefixed with
0x, it will be interpreted as an hexadecimal number. For the meaning of values, see the DEBUG section.
Miscellaneous options:
-
-app_config -
Ignored, present for midl compatibility.
-
--acf=file -
Use specified application configuration file.
-
--local-stubs=file -
Generate empty stubs for call_as/local methods in an object interface and write them to file.
Debug
Debug level n is a bitmask with the following meaning:
- 0x01 Tell which resource is parsed (verbose mode)
- 0x02 Dump internal structures
- 0x04 Create a parser trace (yydebug=1)
- 0x08 Preprocessor messages
- 0x10 Preprocessor lex messages
- 0x20 Preprocessor yacc trace
Releases
6 releases since Debian 3.1 (Sarge); the text changed 4 times.
--acf since Arch Linux 2026-11-01;
--align since Arch Linux 2026-11-01;
--local-stubs since Debian 5.0 (Lenny);
--nostdinc since Arch Linux 2026-11-01;
--ns_prefix since Arch Linux 2026-11-01;
--oldnames since Debian 4.0 (Etch);
--oldtlb since Arch Linux 2026-11-01;
--output since Debian 7 (Wheezy);
--packing since Arch Linux 2026-11-01;
--prefix-all since Debian 5.0 (Lenny);
--prefix-client since Debian 5.0 (Lenny);
--prefix-server since Debian 5.0 (Lenny);
--sysroot since Arch Linux 2026-11-01;
--target since Arch Linux 2026-11-01;
--win32 since Debian 7 (Wheezy);
--win64 since Debian 7 (Wheezy);
--winmd since Arch Linux 2026-11-01;
--winrt since Arch Linux 2026-11-01;
-L since Arch Linux 2026-11-01;
-Oi since Debian 7 (Wheezy);
-Oic since Debian 7 (Wheezy);
-Oicf since Debian 7 (Wheezy);
-Oif since Debian 7 (Wheezy);
-Os since Debian 7 (Wheezy);
-app_config since Arch Linux 2026-11-01;
-b since Debian 7 (Wheezy);
-c since Debian 4.0 (Etch);
-m32 since Debian 7 (Wheezy);
-m64 since Debian 7 (Wheezy);
-o since Debian 7 (Wheezy);
-p since Debian 4.0 (Etch);
-r since Debian 7 (Wheezy);
-s since Debian 4.0 (Etch);
-u since Debian 4.0 (Etch).
--dlldata until Debian 6.0 (Squeeze);
-C until Debian 6.0 (Squeeze);
-H until Debian 6.0 (Squeeze);
-P until Debian 6.0 (Squeeze);
-S until Debian 6.0 (Squeeze);
-T until Debian 6.0 (Squeeze);
-U until Debian 6.0 (Squeeze).