linker: undefined reference to `nktickdef'
hi,
I have a kernel 2.6.14 patched whit xenomai-2.1-rc2, i do real time applications in user space, i want to compil a program whit eclipse (SDK), i have no errors on my program file but i have an error whit the linker, i have :
Building file: ../Util.c
Invoking: GCC C Compiler
gcc -D__XENO__ -D__XENO_UVM__ -DHPCi_linux -I/usr/xenomai/include -I/Hpci/workspace/cible2_linux/H -I/usr/include -O0 -g3 -Wall -c -fmessage-length=0 -oUtil.o ../Util.c Finished building: ../Util.c
Building file: ../main_hpci.c
Invoking: GCC C Compiler
gcc -D__XENO__ -D__XENO_UVM__ -DHPCi_linux -I/usr/xenomai/include -I/Hpci/workspace/cible2_linux/H -I/usr/include -O0 -g3 -Wall -c -fmessage-length=0 -omain_hpci.o ../main_hpci.c ../main_hpci.c: Dans la fonction « main_task »:../main_hpci.c:85: attention : implicit declaration of function `kbhit'../main_hpci.c:59: attention : unused variable `cmd_line'
Finished building: ../main_hpci.c
Building file: ../rtai_util.c
Invoking: GCC C Compiler
gcc -D__XENO__ -D__XENO_UVM__ -DHPCi_linux -I/usr/xenomai/include -I/Hpci/workspace/cible2_linux/H -I/usr/include -O0 -g3 -Wall -c -fmessage-length=0 -ortai_util.o ../rtai_util.c Finished building: ../rtai_util.c
Building target: test2
Invoking: GCC C Linker
gcc -L/usr/xenomai/lib --uvm-ldflags -otest2 ./Util.o ./main_hpci.o ./rtai_util.o -luvm -lnucleus -lpthread -lvxworks /usr/xenomai/lib/libvxworks.a(module.o)(.text+0xb1): dans la fonction « __xeno_skin_init »:
: undefined reference to `nktickdef'
collect2: ld a retourné 1 code d'état d'exécution
make: *** [test2] Erreur 1
make: La cible `all' n'a pas pu être refabriquée à cause d'erreurs.
Build complete for project test2
what can i do solve it.
THANKS
Gilles
Quoted 3 lines · gilles mendes
(...)
gcc -L/usr/xenomai/lib --uvm-ldflags -otest2 ./Util.o ./main_hpci.o ./rtai_util.o -luvm -lnucleus -lpthread -lvxworks (...)
You likely have a problem with the makefile: the parameter --uvm-ldflags should be passed to xeno-config, not to gcc.
You should try first with a simple Makefile, such as ksrc/skins/vxworks/demos/Makefile
Once it works with this simple makefile, you can try with a complex one.
Signature · 1 line
Gilles Chanteperdrix.