QM  4.5.1
QM Compiler (qmc)

The QM™ installation folder contains the command-line utility called qmc (QM Compiler), which can generate code from a given QM model file. The qmc utility allows you to incorporate the code generation step into an automated build process, such as Makefiles, build scripts, or extra pre-compile steps in project files.

By design, the qmc utility generates identical code as the QM™ graphical tool. In particular, qmc is aware of the QM session file and applies the same QP licensing terms as QM™ (see also generating comments).

Attention
The qmc utility will be phased out in the future, because starting with version 4.1.2, the QM™ application supports the console mode, in which it can generate code (and also generate diagrams). The QM console-mode replaces the functionality of the qmc utility.

Invoking qmc on Windows

On Windows, the qmc.exe executable is located in the <qm>\bin\ directory, where <qm> denotes the directory, in which you have installed QM. Assuming that you have installed QM in C:\qp\qm\, you can invoke the qmc as follows:

C:\qp\qm\bin\qmc <qm-model-file>

where <qm-model-file> stands for the QM model file to process. The <qm-model-file> can contain the whole absolute or relative path to the QM model file.

The following screen shot illustrates the invocation of the qmc utility from the Windows Command-Prompt:

ce_qmc.png
Example of qmc invocation and output

Invoking qmc on Linux

On Linux, you invoke qmc by means of the shell script qmc.sh, which is located in the <qm>/bin/ directory, where <qm> denotes the directory, in which you have installed QM. Assuming that you have installed QM in /home/<user>/qp/qm, you can invoke the qmc as follows:

/home/<user>/qp/bin/qm.sh <qm-model-file>

where <qm-model-file> stands for the QM model file to process. The <qm-model-file> can contain the whole absolute or relative path to the QM model file.


Invoking qmc on MacOS

On MacOS, the qmc executable is located in the the same bundle as the QM graphical modeling tool. Assuming that you have installed QM into the /Applications/ folder, you can invoke the qmc as follows:

/Applications/qm.app/Contents/MacOS/qmc <qm-model-file>

where <qm-model-file> stands for the QM model file to process. The <qm-model-file> can contain the whole absolute or relative path to the QM model file.


Next: Revision History