Linux Commands Examples

A great documentation place for Linux commands


Wine Interface Definition Language (IDL) compiler


widl [options] infile.idl
[options] --dlldata-only name1 [name2 ...]

add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!


echo "This script requires 2 arguments: The location of the repository and the destination directory for the spec (both full paths). The first argument should point to a folder with three folders: static (where static html files are stored), widl (where WebIDL sources are stored) and resources (where additional resources such as wildproc, dtd, xsl... are stored). If the operation completes successfully the spec will be generated in the apis folder created on the specified destination folder."
#STATICFILES='geolocation.html webinos-apis.js webinos-apis.css'
STATICFILES=$(ls "$REPOS/static/")
# Device API widls
WIDLFILES=$(ls -I "*~" $REPOS/widl/)


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


General options:


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.

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

Header options:


Generate header files. The default output filename is infile.h.


Use old naming conventions.

Type library options:


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.

-m32, -m64

Generate a Win32, respectively Win64, type library.

UUID file options:


Generate a UUID file. The default output filename is infile_i.c.

Proxy/stub generation options:


Generate a client stub file. The default output filename is infile_c.c.


Generate inline stubs.


Generate old-style interpreted stubs.

-Oif, -Oic, -Oicf

Generate new-style fully interpreted stubs.


Generate a proxy. The default output filename is infile_p.c.


Prefix to put on the name of both client and server stubs.


Prefix to put on the name of client stubs.


Prefix to put on the name of server stubs.


Generate a server stub file. The default output filename is infile_s.c.

--win32, --win64

Only generate 32-bit, respectively 64-bit code (the default is to generate both 32-bit and 64-bit versions into the same destination file).

Registration script options:


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:
name1 [name2...]

Regenerate the dlldata file from scratch using the specified proxy names. The default output filename is dlldata.c.

Preprocessor options:

Add a header search directory to path. Multiple search directories are allowed.

-D id[=val]

Define preprocessor macro id with value val.


Preprocess only.


Do not preprocess input.

Debug options:


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:

Generate empty stubs for call_as/local methods in an object interface and write them to file.


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


widl is incomplete. Please file bug reports for this application at

see also

The Winelib User Guide
The Wine Developers Guide


widl was originally written by Ove Kaaven. 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.

How can this site be more helpful to YOU ?

give  feedback