Resources | Resources |



Output languages

The compiler is currently able to generate C and C++ code and Component Information Files (CIFs) from IDL. The default output mode is "C and C++" (-mcxx).


The default output mode, C and C++ (-mcxx), generates a hybrid C/C++ header along with a C stub and skel. The C-only mode (-mc) generates a C-only header along with a C stub and skel. Because the stubs and skels generated for C/C++ are always generated in C, the C++-only mode (-mc) is only valid if only a header is generated (-ho).

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


The CIF output mode (--cif) generates a CIF with 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.


The Lua output mode -mlua generates a Lua header containing all the constants from the IDL file, as well as a Lua stub and skeleton. Typically, a user runs this command with the --header-only option. Instead of generating a Lua stub and skeleton, users use qidlc to embed a Binary Interface Map (BIM) into the CIF file with the --mebim --cif options. The platform then automatically loads the BIM and generates a Lua stub and skel at runtime.


The JavaScript Object Notation (JSON) output mode is only available with the --header-only option. It outputs all IDL constants in JSON syntax.