WIDL(1)

πŸ’– WIDL(1) β€” Wine Developers Manual πŸ’–

okay bestie, sit down, hydrate, because today we're learning about widl, the Wine Interface Definition Language (IDL) compiler. yes it's a compiler. yes it's iconic. yes it lives in the Wine Developers Manual section 1. let's get into it ✨


🌸 SYNOPSIS 🌸

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

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the vibe: when you run it with no options at all, it goes full main character 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 the IDL file. it's giving "I'll decide what you need" πŸ’…

but the second you pass any of -c, -h, -p, -s, -t, -u or --local-stubs, it gets picky and generates only the files you asked for, and literally nothing else. no extra credit, no surprises.

then when you run it with --dlldata-only, it will only generate 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: each time widl runs, it reads whatever existing dlldata file is already there, and if necessary it regenerates it with the same list of names β€” but now with the present proxy file included 🫢

and if you run it with no arguments whatsoever? it just prints a help message. it's helping. it's doing its best.


✨ OPTIONS ✨

πŸŽ€ General options:

  • -V β€” Print the version number and exit. boom, done, bye.
  • -o, --output=name β€” Set the name of the output file. When you're generating multiple output files, this sets only the base name of the file; the respective output files then get named name.h, name_p.c, etc. But if you specify a full file name with an extension, only that one file gets generated. specific queen πŸ’…
  • -b, --target=cpu-manufacturer[-kernel]-os β€” Set the target architecture when you're cross-compiling. The target spec is in the standard autoconf format, exactly as returned by config.sub.
  • -m32, -m64, --win32, --win64 β€” Force the target architecture to 32-bit or 64-bit. pick your fighter.
  • --sysroot=dir β€” Prefix the standard include paths with dir.
  • --nostdinc β€” Do NOT search standard include paths like /usr/include and /usr/local/include. it said no thank you 🚫

🌈 Header options:

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

⭐ Type library options:

  • -t β€” Generate a type library. The default output filename is infile.tlb. And here's a fun twist: if the output file name ends in .res, a binary resource file containing the type library gets generated instead ✨
  • -L path β€” Add a directory to the library search path for imported typelibs. You can specify this option multiple times. stack 'em.
  • --oldtlb β€” Generate a type library in the old format (SLTG format). throwback format, love that for it.

πŸ’œ 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, so it's the one pulling up to every party πŸŽ‰
  • -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. equal opportunity prefixing.
  • --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. windows runtime era activated.
  • --ns_prefix β€” Prefix namespaces with ABI namespace.

πŸ“ Registration script options:

  • -r β€” Generate a registration script. The default output filename is infile_r.rgs. And plot twist: if the output file name ends in .res, a binary resource file containing the script is generated instead. same energy as -t, but for scripts πŸ’–

πŸ‘‘ 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. clean slate, fresh start, new me.

πŸ’« Metadata file options:

  • --winmd β€” Generate a Windows Runtime Metadata file. This implies the --winrt mode. The default output filename is infile.winmd.

🧚 Preprocessor options:

  • -I path β€” Add a directory to the include search path. Multiple include directories are allowed. the more the merrier.
  • -D id[=val] β€” Define preprocessor macro id with value val.
  • -E β€” Preprocess only. don't do anything else. just vibes.
  • -N β€” Do not preprocess input.

πŸ”₯ Debug options:

  • -W β€” Enable pedantic warnings. it will be in your business. lovingly.
  • -d n β€” Set debug level to the non negative integer n. If it's 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 reading πŸ‘‡).

🌸 Miscellaneous options:

  • -app_config β€” Ignored, present for midl compatibility. it's just there for the lore.
  • --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

do the math, mix and match, go feral πŸ”₯


😭 BUGS 😭

Bugs can be reported on the Wine bug tracker. found one? tell on it, fr fr.


🫢 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 (iykyk). This man page was originally written by Hannu Valtonen and then updated by Dan Hipschman. legends only πŸ‘‘


🌟 AVAILABILITY 🌟

widl is part of the Wine distribution, which is available through WineHQ, the Wine development headquarters. go get it.


🌈 SEE ALSO 🌈

Wine documentation and support. that's the whole list. short and sweet.


and that's the tea, bestie πŸ’… this was Wine 11.20, dated October 2007 β€” yes she's been iconic since 2007 and she's still slaying. periodt πŸŽ€βœ¨

πŸ“¦ where this page comes from