I am working with VxWorks SDK on QEMU. I am writing a simple C++ program to enable round-robin scheduling and experiment a bit with the scheduler. In order to enable round-robin I call kernelTimeSlice(10) of kernelLib.h but I get a fatal error:
fatal error: 'kernelLib.h' file not found
#include <kernelLib.h>
^~~~~~~~~~~~~
1 error generated.
Other libraries like taskLib.h are found.
Does anyone know why? A quick look at the path of others headers like taskLib.h brings to the path vxsdk/sysroot/krnl/h/public and vxsdk/sysroot/usr/h/public but a search for kernelLib leads to vxsdk/sysroot/krnl/h/public.
I tried the “hard way” by including the full path to kernelLib.h:
#include "wrsdk-vxworks7-qemu/vxsdk/sysroot/krnl/h/public/kernelLib.h"
but when compiling I get:
$ wr-c++ hello_vxworks.cpp -static -o hello_vxworks
/home/vboxuser/Desktop/wrsdk-vxworks7-qemu/vxsdk/host/x86_64-linux/bin/../../../../compilers/llvm-16.0.0.1/LINUX64/bin/ldpentium: /tmp/wrccMGMTOE.o: in function `main':
hello_vxworks.cpp:(.text+0x2c3): undefined reference to `kernelTimeSlice'
I am pretty sure the motivation is tied to the fact that kernelLib.h is in the krnl
path but I have no more clues.