problems with rt libraries in C

Baur, Elias st153286 at
Fri Jan 18 16:38:38 CET 2019

Hello everyone,

First of all, I've got Xenomai running on a SanCloud Beaglebone Enhanced and the latency test works.
I am using Xenomai 3.0.7 on Linux kernel 4.4.

I am currently building a tiny program in C to get some UDP-messages sent and received. This works perfectly on a non-realtime beaglebone but, as I am trying to rewrite the code using rt-functions provided by Xenomai, I am facing problems:

To create a socket, I am using the "rt_dev_socket ()"-function which is defined in the "rtdm.h"-header-file and described in the xenomai documentation. But, I am not able to find and include the correct library which defines the correct reference. Therefore, I replaced the "rt_dev_" commands with "rtdm_" which I have found a couple of times in the newer xenomai documentation. So my command to create a socket now is "rtdm_socket()". Nevertheless, I am still getting the same error code, which looks like the following:

rtt_rt.c: (.text+0x76): undefined reference to 'rtdm_socket'

My command to compile the file is provided below:

gcc rtt_rt.c -o rtt:rt -I/usr/xenomai/include/ -I/usr/xenomai/include/cobalt -I/usr/xenomai/include/trank/ -L/usr/xenomai/lib -ltrank -lalchemy -lcobalt -lcopperplate -lmodechk

So I am already including the libraries provided by xenomai which helped to solve the same problem for functions like "rt_task_create". However, I am not able to find the correct library which is providing reference for rtdm_socket or rt_dev_socket. That is why I am asking you for help. What am I doing wrong?

I am looking forward to get an answer! Thank you very much!

Best, Eloa

More information about the Xenomai mailing list