Resources | Resources |



Qidl command-line syntax

The command-line syntax of the qidl compiler is as follows:

qidl [options] file1.idl [file2.idl ... fileN.idl]

Each file specified on the command line is compiled according to the options specified. Available options are described in the following table.


Set the target language mapping to lang. Available mappings are C (-mc ), C++ (-mc++ ), combined C and C++ (-mcxx, the default), and CIF (-mcif ).

A hybrid C/C++ header and C stub and skel are generated.
A C-only header and C stub and skel are generated.
Valid only with -ho.

Note: The C and C++ mappings are compatible at the binary level, which allows C stubs and skels to be used with C++ clients and implementations. C++ stubs and skels are not generated because they are unnecessary.

A Component Information File is generated, which contains an Interface declaration specifying the stub and skel to use for each IDL interface. This output mode is intended for use in conjunction with C stub and skel generation, as generated CIFs specify that the generated C stubs and skels should be used for each interface. Aside from this dependency, generated CIF files are standalone, and do not include any headers or other external files.

-o path

Use path as the output path. All generated files will be output to the specified path. The default is the current directory ('.').

--cpp cpp

-p cpp

Use cpp as the C preprocessor. The default is the program cpp (the standard C preprocessor). The value cpp must specify an executable program and cannot contain any arguments. To pass arguments to the preprocessor, use --arg-cpp (-pa ).

--arg-cpp arg

-pa arg

Pass the argument arg to the preprocessor. To specify arguments that are themselves options, use the form -pa=arg (for example, -pa=-E ). Specifying -pa -E will cause the -E to be interpreted as an option to qidl instead of to the preprocessor.

Note: For comment pass-through to work properly, the preprocessor must be set to not strip comments from the source. Typically, the flag to do this is -C , making the appropriate argument to qidl -pa=-C. See the QIDL Reference for more information on comment pass-through.

--include-path path

-I path

Include path in the search path for included files.

--indent width

-I width

Use an indentation width of width spaces in the generated code.



Force code generation even if there are forward declarations without corresponding definitions.

--define macro

-D macro

Predefine macro for the preprocessor.



Deprecated; use --header-only instead.

Skip generation of remoting code (stubs and skeletons). With this option enabled, only a header file will be generated for the specified language.



For the C, C++, and C/C++ mappings, only generate a header. Stub and skeleton code is not generated.



For the C and C/C++ mappings, only generate stub and skeleton code. The corresponding header is not generated.



Parse the IDL and perform semantic checking, but do not generate any output. Note that IDL files accepted without errors by the compiler with -s are not guaranteed to work without errors when code generation is enabled due to differences between QIDL and OMG IDL. For more information, see the QIDL Reference.

--root-interface iface

-ri iface

Use iface as the root interface. For Services, the root interface is the one that all interfaces, except the root interface itself, must ultimately derive from; that is, IQI . By default, the root interface used is IQI (at global scope).


Print the version of the compiler.


Print a brief help message.




Previously caused IDL enumerated types to be mapped as C/C++ enumerated types instead of integers. Currently, IDL enumerated types are always mapped to C/C++ enumerated types; see the QIDL Reference for more information on the mapping of enumerated types.