Next: , Up: The Skeleton: first-service.c   [Contents]


4.1.1 Compiling and Running

To turn this code into a binary, use gcc along with pkg-config to automatically pull in the necessary flags and libraries:

gcc -o my-first-service my-first-service.c \
  `pkg-config --cflags --libs starter-core`

When you run it, it might look like it’s doing nothing. But by enabling debug logs, you can watch the handshake happen in real-time:

export G_MESSAGES_DEBUG=libstarter-core
./my-first-service

If the Core is already running, you’ll see your service "answering" the Core’s queries:

... handle method call GetInputs
... handle method call GetOutputs
... handle method call GetStats