Gilles Chanteperdrix | 3 Aug 2012 14:24
Favicon

Re: Link error for the Xenomai 2.6.1 example "trivial-periodic.c"

On 08/03/2012 01:39 PM, Bao Rui wrote:
> Hi Gilles,
> 
> Thanks for your reply! I think it is not the same issue. I installed
> xenomai already, and them I want to compile the example\native. Here is my
> compile command:
> gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -D__XENO__   -lnative
> -L/usr/xenomai/lib -lxenomai -lpthread -lrt  -Xlinker -rpath -Xlinker
> /usr/xenomai/lib  trivial-periodic.c   -o trivial-periodic

When link-editing, the link order is important, so, -lnative should come
after trivial-periodic.c

Please no private mails.

--

-- 
					    Gilles.

Gmane