WIDL(1)

πŸ“¦
version 10.0 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– WIDL(1) πŸ’–

okay bestie, gather round β€” this is the Wine Developers Manual page for widl, the Wine Interface Definition Language (IDL) compiler. She compiles IDL files, she generates code, she's lowkey the backbone of a whole lot of Wine internals, and today you're gonna understand her. πŸŽ€


✨ SYNOPSIS ✨

widl [options] IDL_file
widl [options] --dlldata-only name1 [name2...]

🌸 DESCRIPTION 🌸

So here's the tea, bestie: when you run widl with no options at all, she goes off and generates a header file β€” and possibly client and server stubs, proxy and dlldata files, a typelib, and a UUID file, depending on what's actually inside your IDL file. She's reading the room and deciding what you need. πŸ’…

But the moment you pass any of -c, -h, -p, -s, -t, -u or --local-stubs, she snaps into only mode: she will generate only the files you asked for, and no others. No extras, no surprise bonus files, periodt. πŸ‘‘

When you run her with --dlldata-only, she only generates a dlldata file, and that file will contain a list of the names you passed as arguments. And here's how that file usually gets updated: every single time widl runs, she reads any existing dlldata file, and if it needs to, she regenerates it with the same list of names β€” but with the present proxy file included. Like, she remembers your exes but makes them current. 😭

And if you run her with no arguments at all? She just prints a help message. A little "hi, here's what I do." 🫢


πŸ’… OPTIONS πŸ’…

🌈 General options

  • -V β€” Print the version number and dip. That's it, that's the whole job.
  • -o, --output=name β€” Sets the name of the output file. When she's generating multiple output files, this only sets the base name; the individual output files then get named name.h, name_p.c, etc. But if you specify a full file name with an extension, then only that one file gets generated. Choose your fighter. ✨
  • -b, --target=cpu-manufacturer[-kernel]-os β€” Set the target architecture when cross-compiling. The target spec is in the standard autoconf format, the same one config.sub returns. πŸ¦‹
  • -m32, -m64, --win32, --win64 β€” Force the target architecture to 32-bit or 64-bit. Pick a lane, babe.
  • --sysroot=dir β€” Prefix the standard include paths with dir.
  • --nostdinc β€” Do not search standard include paths like /usr/include and /usr/local/include. She's going rogue, she's independent, she doesn't need them. πŸ’€

πŸŽ€ Header options

  • -h β€” Generate header files. The default output filename is infile.h.
  • --oldnames β€” Use old naming conventions. Vintage, retro, nostalgic-core.

⭐ Type library options

  • -t β€” Generate a type library. The default output filename is infile.tlb. And plot twist: 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. You can specify this option multiple times β€” stack 'em, she doesn't mind. πŸ’–
  • --oldtlb β€” Generate a type library in the old format (SLTG format). Grandma's typelib.

πŸ¦‹ 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. Those are the options, bestie, don't get creative.
  • -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. She's already doing this, you just didn't know. πŸ‘‘
  • -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.
  • --winrt β€” Enable Windows Runtime mode. Entering her WinRT era.
  • --ns_prefix β€” Prefix namespaces with the ABI namespace.

πŸ’œ Registration script options

  • -r β€” Generate a registration script. The default output filename is infile_r.rgs. And same plot twist as the typelib: 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.

🧚 Preprocessor options

  • -I path β€” Add a directory to the include search path. Multiple include directories are allowed. Collect them all. ✨
  • -D id[=val] β€” Define preprocessor macro id with value val.
  • -E β€” Preprocess only. Just the appetizer, no main course.
  • -N β€” Do not preprocess input. Raw. Unfiltered. πŸ’…

πŸ™ˆ Debug options

  • -W β€” Enable pedantic warnings. She will be in your business about it.
  • -d n β€” Set debug level to the non-negative integer n. If prefixed with 0x, it gets interpreted as a hexadecimal number. For the meaning of the values, go look at the DEBUG section below, bestie. 😭

πŸ“ Miscellaneous options

  • -app_config β€” Ignored, present for midl compatibility. She's just standing there. Menacingly. πŸ’€
  • --acf=file β€” Use the 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, and here's what each bit is giving:

  • 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

Stack those bits like accessories, bestie. ✨


πŸ’€ BUGS πŸ’€

Found a bug? Bugs can be reported on the Wine bug tracker. She's not mad, she just wants to know. 🫢


πŸ‘‘ 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 β€” the receipts are all there. πŸ“œ

This man page was originally written by Hannu Valtonen and then updated by Dan Hipschman. Iconic lineage, honestly.


🌈 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.


and that's the whole page, bestie!! πŸ’– this one's from the Wine Developers Manual, version Wine 10.0, dated October 2007 β€” yeah, she's a little vintage but she still ate. mwah πŸ’…βœ¨