From: Tom Z <tomz30@yahoo.com>
To: xenomai@xenomai.org
Subject: [Xenomai] linkage problem under 2.6.2.1
Date: Wed, 13 Mar 2013 16:26:02 -0500 [thread overview]
Message-ID: <5140EEEA.2080209@yahoo.com> (raw)
Hi,
First I would like to sincerely thank all the people here that kindly
helped me with my previous problems regarding Xenomai installation.
Now I got Xenomai 2.6.2.1 running on Ubuntu 12.04 (Linux-3.5.7) . I
added
"/usr/xenomai/bin:/usr/xenomai/lib:/usr/xenomai/include:/usr/local/lib"
to my $PATH, and can run "xeno latency" and "xeno-test".
However, when I tried to compile this toy program found at
http://www.cs.ru.nl/lab/xenomai/ , I got some linage problems as follows:
/tmp/ccwl2tpg.o: In function `main':
ex01.c:(.text+0x8a): undefined reference to `rt_print_auto_init'
ex01.c:(.text+0xa2): undefined reference to `rt_printf'
ex01.c:(.text+0xe3): undefined reference to `rt_task_create'
ex01.c:(.text+0xff): undefined reference to `rt_task_start'
collect2: ld returned 1 exit status
The above source code can be compiled & linked under Xenomai 2.4.3
smoothly, and I understand that the rtdk library had been moved to
libxenomai, so I changed the build flags accordingly. Below is what I
used to build the above toy program:
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -D__XENO__
-lnative -L/usr/xenomai/lib -lxenomai -lpthread -lrt -lxenomai ex01.c -o
ex01
On my system, running "xeno-config --skin=native --cflags" gets
"-I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -D__XENO__",
and running "xeno-config --skin=native --ldflags" gets "-lnative
-L/usr/xenomai/lib -lxenomai -lpthread -lrt".
Under "/usr/xenomai/lib", I can find libnative.[a|la|so],
libxenomai.[a|la|so], and other libs.
I don't understand why there are still undefined reference to
`rt_print_auto_init', etc. Did I miss something while building this program?
With many thanks,
Tom
next reply other threads:[~2013-03-13 21:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-13 21:26 Tom Z [this message]
2013-03-13 21:39 ` [Xenomai] linkage problem under 2.6.2.1 Gilles Chanteperdrix
2013-03-21 21:33 ` Tom Z
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5140EEEA.2080209@yahoo.com \
--to=tomz30@yahoo.com \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.