[LITMUS^RT] [how to compile new task using make file/make in liblitmus]

Dhanny R dhanker2626 at gmail.com
Wed Jun 3 08:16:25 CEST 2015


hello everyone, i have a problem.

when i create new task, i compile in gcc like:

root at vm:~/liblitmus/bin# gcc -o test task.c , the result are :

/tmp/cc3wjv75.o: In function `main':
base_task.c:(.text+0x17): undefined reference to `init_rt_task_param'
base_task.c:(.text+0x49): undefined reference to `init_litmus'
base_task.c:(.text+0xa0): undefined reference to `gettid'
base_task.c:(.text+0xae): undefined reference to `set_rt_task_param'
base_task.c:(.text+0x105): undefined reference to `task_mode'
base_task.c:(.text+0x157): undefined reference to `sleep_next_period'
base_task.c:(.text+0x16f): undefined reference to `task_mode'
collect2: ld returned 1 exit status

when i test make without compile gcc, the result are :
root at vm:~/liblitmus# make

gcc -O2 -Wall -Werror -g -Wdeclaration-after-statement -D_XOPEN_SOURCE=600
-D_GNU_SOURCE -m64 -DARCH=x86_64 -I./include -I./arch/x86/include
-I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi  -c -o
base_mt_task.o bin/base_mt_task.c
bin/base_mt_task.c: In function ‘main’:
bin/base_mt_task.c:96:20: error: ‘task’ undeclared (first use in this
function)
bin/base_mt_task.c:96:20: note: each undeclared identifier is reported only
once for each function it appears in
bin/base_mt_task.c: In function ‘rt_thread’:
bin/base_mt_task.c:154:1: error: implicit declaration of function ‘gettid’
[-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors
make: *** [base_mt_task.o] Error 1

could anybody help me to fix that? how to solving that?
and how to compile new task using makefile/make?

thanks for the help..

regards
Dhanny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20150603/a31e7dbe/attachment.html>


More information about the litmus-dev mailing list