|
| 1 | +# widl(1) |
| 2 | + |
| 3 | +## NAME |
| 4 | +widl - Wine Interface Definition Language (IDL) compiler |
| 5 | + |
| 6 | +## SYNOPSIS |
| 7 | + |
| 8 | +**widl** [*options*] *IDL_file* |
| 9 | + |
| 10 | +**widl** [*options*] --dlldata-only *name1* [*name2...*] |
| 11 | + |
| 12 | +## DESCRIPTION |
| 13 | + |
| 14 | +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. |
| 15 | + |
| 16 | +When run without any arguments, `widl` will print a help message. |
| 17 | + |
| 18 | +## OPTIONS |
| 19 | + |
| 20 | +### General options: |
| 21 | + |
| 22 | +- `-V` - Print version number and exit. |
| 23 | +- `-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. |
| 24 | +- `-b 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`. |
| 25 | + |
| 26 | +### Header options: |
| 27 | + |
| 28 | +- `-h` - Generate header files. The default output filename is *infile*.h. |
| 29 | +- `--oldnames` - Use old naming conventions. |
| 30 | + |
| 31 | +### Type library options: |
| 32 | + |
| 33 | +- `-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. |
| 34 | +- `-m32, -m64` - Generate a Win32 or Win64 type library respectively. |
| 35 | + |
| 36 | +### UUID file options: |
| 37 | + |
| 38 | +- `-u` - Generate a UUID file. The default output filename is *infile*_i.c. |
| 39 | + |
| 40 | +### Proxy/stub generation options: |
| 41 | + |
| 42 | +- `-c` - Generate a client stub file. The default output filename is *infile*_c.c. |
| 43 | +- `-Os` - Generate inline stubs. |
| 44 | +- `-Oi` - Generate old-style interpreted stubs. |
| 45 | +- `-Oif, -Oic, -Oicf` - Generate new-style fully interpreted stubs. |
| 46 | +- `-p` - Generate a proxy. The default output filename is *infile*_p.c. |
| 47 | +- `--prefix-all=prefix` - Prefix to put on the name of both client and server stubs. |
| 48 | +- `--prefix-client=prefix` - Prefix to put on the name of client stubs. |
| 49 | +- `--prefix-server=prefix` - Prefix to put on the name of server stubs. |
| 50 | +- `-s` - Generate a server stub file. The default output filename is *infile*_s.c. |
| 51 | +- `--win32`, `--win64` - Only generate 32-bit or 64-bit code respectively (the default is to generate both 32-bit and 64-bit versions into the same destination file). |
| 52 | +- `--rt` - Enable additional language extensions for IDL to support WinRT. |
| 53 | + |
| 54 | +### Registration script options: |
| 55 | + |
| 56 | +- `-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. |
| 57 | + |
| 58 | +### Dlldata file options: |
| 59 | + |
| 60 | +- `--dlldata-only name1 [name2...]` - Regenerate the dlldata file from scratch using the specified proxy names. The default output filename is `dlldata.c`. |
| 61 | + |
| 62 | +### Preprocessor options: |
| 63 | + |
| 64 | +- `-I path` - Add a header search directory to path. Multiple search directories are allowed. |
| 65 | +- `-D id[=val]` - Define preprocessor macro *id* with value *val*. |
| 66 | +- `-E` - Preprocess only. |
| 67 | +- `-N` - Do not preprocess input. |
| 68 | + |
| 69 | +### Debug options: |
| 70 | + |
| 71 | +- `-W` - Enable pedantic warnings. |
| 72 | +- `-d n` - Set debug level to the non negative integer *n*. If prefixed with `0x`, it will be interpreted as a hexadecimal number. For the meaning of values, see the DEBUG section. |
| 73 | + |
| 74 | +### Miscellaneous options: |
| 75 | + |
| 76 | +- `-app_config` - Ignored, present for midl compatibility. |
| 77 | +- `--local-stubs=file` - Generate empty stubs for call_as/local methods in an object interface and write them to *file*. |
| 78 | + |
| 79 | +## DEBUG |
| 80 | + |
| 81 | +Debug level *n* is a bitmask with the following meaning: |
| 82 | +- 0x01 Tell which resource is parsed (verbose mode) |
| 83 | +- 0x02 Dump internal structures |
| 84 | +- 0x04 Create a parser trace (yydebug=1) |
| 85 | +- 0x08 Preprocessor messages |
| 86 | +- 0x10 Preprocessor lex messages |
| 87 | +- 0x20 Preprocessor yacc trace |
| 88 | + |
| 89 | +## BUGS |
| 90 | + |
| 91 | +Bugs can be reported on the [Wine bug tracker](http://bugs.winehq.org). |
| 92 | + |
| 93 | +## AUTHORS |
| 94 | + |
| 95 | +`widl` was originally written by Ove Kåven. It has been improved by Rob Shearman, Dan Hipschman, and others. For a complete list, see the git commit logs. This man page was originally written by Hannu Valtonen and then updated by Dan Hipschman. |
| 96 | + |
| 97 | +## AVAILABILITY |
| 98 | + |
| 99 | +`widl` is part of the Wine distribution, which is available through WineHQ, the [Wine development headquarters](http://www.winehq.org/). |
| 100 | + |
| 101 | +## SEE ALSO |
| 102 | + |
| 103 | +[Wine documentation and support](http://www.winehq.org/help) |
0 commit comments