Resources | Resources |



Command-line usage

The following code shows the command-line syntax of the tool.

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

Each file specified on the command line is compiled by the tool according to the options specified. Following are the available options.

  • -mlang: Set the target language mapping to lang. The default mapping is -mcxx. Available mappings are:
    • -mc C
    • -mc++ C++ (only valid in conjunction with --header-only)
    • -mcxx combined C and C++
    • -mcif CIF
    • -mlua Lua
    • -mjson JSON
    • -mbim Binary Interface Map
    • -mebim Binary Interface Map embedded in a CIF resource (Only valid in conjunction with --cif or --cif-only)

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

  • -p=CPP: Use CPP as the C preprocessor. The value CPP must name an executable program, and cannot contain any arguments. To pass arguments to the preprocessor, use --arg-cpp (-pa)
  • --arg-cpp=ARG
  • -pa=ARG: Pass additional argument arg to the preprocessor. To specify arguments that are options, use the form -pa=ARG (for example, -pa=-E). Specifying -pa -E will cause the -E to be interpreted as an option to qidlc instead of to the preprocessor.

    Note: For Comment pass-through to work properly, the preprocessor must be set not to strip comments from the source. Typically the flag to do this is -C, providing the argument to qidlc -pa=-C

  • --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
  • --warn-undefined
  • -Wu: Issue warning for forward-declared interfaces that are never defined.
  • --define=SYMBOL
  • -D=SYMBOL: Predefine macro for the preprocessor. Skip generation of remoting code (stubs and skels). With this option enabled, only a header file will be generated for the specified language.
  • --header-only
  • -ho: For the C, C++, and C/C++ mappings, only generate a header. Stub and skel code is not generated if this option is specified.
  • --remoting-only
  • -ro: For the C and C/C++ mappings, only generate stub and skel code. The corresponding header is not generated if this option is specified.
  • --batch=NAME -b: Generates remoting (stub/skel) code into a single file. The value for this argument specifies the basename of the file into which the remoting code is generated.
  • --parse-only
  • -s: 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, since the OS Services backends place additional restrictions on the IDL. See the Qualcomm Interface Definition Language Reference for details on the relationship to OMG IDL.
  • --root-interface=NAME
  • -ri=NAME: Use iface as the root interface. All interfaces, except the root interface itself, must ultimately derive from the root interface (IQI). By default, the root interface used is IQI (at global scope).
  • -v: Print the version of the compiler.
  • -h: Print a brief help message.