WIDL(1)

๐Ÿ“ฆ version 13.0.0, in debian trixie, ubuntu resolute, ubuntu stonking

โœจ WIDL(1) โ€” the Wine Interface Definition Language compiler โœจ

okay bestie, welcome to widl, the Wine Interface Definition Language (IDL) compiler ๐Ÿ’… this lil diva lives in the Wine Developers Manual and she is so much cooler than she looks. she eats IDL files for breakfast and spits out headers, stubs, typelibs and UUIDs like it's nothing. no cap. let's get into it ๐Ÿซถ


๐ŸŒธ NAME ๐ŸŒธ

widl โ€” the Wine Interface Definition Language (IDL) compiler. that's her. that's the whole name. iconic behavior honestly.


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

x86_64-w64-mingw32ucrt-widl [options] IDL_file
x86_64-w64-mingw32ucrt-widl [options] --dlldata-only name1 [name2...]

two moods, two modes. pick your fighter โœจ


๐Ÿ’– DESCRIPTION ๐Ÿ’–

so here's the tea, bestie. when you run widl with no options at all, she goes feral (affectionate) and generates a header file, and possibly client and server stubs, proxy and dlldata files, a typelib, and a UUID file โ€” all depending on what's actually inside your IDL file. she reads the room and delivers accordingly, main character energy fr fr ๐Ÿ‘‘

BUT. if you pass any of the options -c, -h, -p, -s, -t, -u or --local-stubs, she only generates the files you asked for and nothing else. no extras, no surprises, she's locked in ๐Ÿ”ฅ

and when you hit her with --dlldata-only? she generates only a dlldata file, and it will contain a list of the names you passed as arguments. the way this file usually gets updated is: every time widl runs, she reads any existing dlldata file, and if necessary regenerates it with the same list of names โ€” but with the present proxy file included. lowkey elegant ๐ŸŒˆ

oh and btw โ€” run widl with no arguments at all and she'll just print a help message. she's polite like that ๐Ÿ’œ


โœจ OPTIONS โœจ

๐ŸŒŸ General options ๐ŸŒŸ

  • -V โ€” Print the version number and exit. short, sweet, slay.
  • -o, --output=name โ€” Set the name of the output file. When you're generating multiple output files, this only sets the base name; the respective output files are then named name.h, name_p.c, etc. yes bestie, she'll do the naming math for you ๐Ÿงฎ
  • -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. very demure, very autoconf ๐ŸŽ€

๐Ÿฆ‹ Header options ๐Ÿฆ‹

  • -h โ€” Generate header files. The default output filename is infile.h.
  • --oldnames โ€” Use old naming conventions. retro vibes, respectfully ๐Ÿ’€

๐Ÿ’ซ 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. plot twist โœจ
  • -m32, -m64 โ€” Generate a Win32 or Win64 type library respectively. pick a lane, bestie ๐Ÿซถ

๐Ÿ”ฎ UUID file options ๐Ÿ”ฎ

  • -u โ€” Generate a UUID file. The default output filename is infile_i.c. the _i is for iconic. (jk it's for interface, but still.) ๐Ÿ’…

๐Ÿ‘‘ Proxy/stub generation options ๐Ÿ‘‘

  • -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. the trio. the girlies. the moment ๐Ÿ”ฅ
  • -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. two birds, one prefix.
  • --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.
  • --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. multitasking queen ๐Ÿ’–
  • --rt โ€” Enable additional language extensions for IDL to support WinRT.

๐Ÿ“ 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-only name1 [name2...] โ€” Regenerate the dlldata file from scratch using the specified proxy names. The default output filename is dlldata.c. fresh start, clean slate, we love a reset ๐Ÿงš

๐Ÿ’œ Preprocessor options ๐Ÿ’œ

  • -I path โ€” Add a header search directory to path. Multiple search directories are allowed. stack 'em up ๐ŸŽ€
  • -D id[=val] โ€” Define preprocessor macro id with value val.
  • -E โ€” Preprocess only.
  • -N โ€” Do not preprocess input.

๐Ÿ˜ญ Debug options ๐Ÿ˜ญ

  • -W โ€” Enable pedantic warnings. she's watching. she's judging. lovingly ๐Ÿ’…
  • -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. (it's right below bestie, keep scrolling ๐Ÿ’–)

๐Ÿซถ Miscellaneous options ๐Ÿซถ

  • -app_config โ€” Ignored, present for midl compatibility. she's just standing there. existing. for compatibility. queen behavior honestly ๐Ÿ’€
  • --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 โ€” so you can stack these like accessories, bestie:

  • 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

๐Ÿ™ˆ BUGS ๐Ÿ™ˆ

Bugs can be reported on the Wine bug tracker. she's not perfect, she's just a compiler ๐Ÿ’…


๐Ÿ’– AUTHORS ๐Ÿ’–

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. absolute legends, all of them ๐Ÿ‘‘


๐ŸŒŸ AVAILABILITY ๐ŸŒŸ

widl is part of the Wine distribution, which is available through WineHQ, the Wine development headquarters. go get her ๐Ÿซถ


๐Ÿฆ‹ SEE ALSO ๐Ÿฆ‹

Wine documentation and support.


okay bestie that's the whole page ๐Ÿ’– this came from the MinGW-w64 edition of the manual, dated October 2007 โ€” yes she's vintage, yes she still serves. go compile something gorgeous, and remember: no cap, widl ate ๐ŸŽ€โœจ๐Ÿ’…

๐Ÿ“ฆ where this page comes from