Compiling and running the sample library

Once ARCS is installed (see this page), you can check the behaviour of the engine by compiling a small sample. In the unpacked sources, you will find a sample directory that contains the necessary sources. Please notice that 1/ you must be familiar with build processes involving Qt, 2/ the procedure below is given for Unix-like systems but may be easily transposed under Windows.

Compiling the sources

In order to compile the sources, you will have to perform the following steps:

  1. move in sample subdirectory;
  2. launch the arcslibmaker utility. It will produce a project file;
  3. generate a Makefile (for unix): qmake;
  4. launch the compilation itself: make.

At the end of this procedure, you will find a library named libsample.so.

Running an example associated to sample library

In the subfolder tests/xmlfiles you will find an XML file named loop.xml. This file contains the description of an application as seen by the ARCS engine. If you want to run the example you will just have to run it with the arcsengine program. A well behaved running session should look like this:

$ arcsengine loop.xml
Application loop.xml loaded.
==================================================
[INF!arcsapplicationcomponent.cpp:96] $ Rev: 207 $
[INF!arcsapplicationcomponent.cpp:63] needed to make "this"
[INF!Application mode] event
[Loop] Emitting iteration 0
[DInt] Received integer 0
[Loop] Emitting iteration 1
[DInt] Received integer 1
[Loop] Emitting iteration 2
[DInt] Received integer 2
[Loop] Emitting iteration 3
[DInt] Received integer 3
[Loop] Emitting iteration 4
[DInt] Received integer 4
[INF!arcsapplicationcomponent.cpp:121] main process has finished.

You can also try the following command lines and see how it affects the behaviour:

  • arcsengine -d iterations=15 loop.xml
  • arcsengine -p profile_2.xml loop.xml

For more information on arcsengine, you can consult its manpage.

If you want additional explanations on the behaviour of this application, you may be interested by this page.