All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ramon Rusli <mon_nie@domain.hid>
To: xenomai@xenomai.org
Cc: Ramon Rusli <mon_nie@domain.hid>
Subject: [Xenomai-help] [ask] error undefined reference while trying to compile
Date: Wed, 23 Feb 2011 03:18:05 +0800 (SGT)	[thread overview]
Message-ID: <753266.83805.qm@domain.hid> (raw)

[-- Attachment #1: Type: text/plain, Size: 1327 bytes --]

Dear,

I am using gcc to compile and make executable file with xenomai, but it getting error, so I want to ask how to get it compiled. I am using the code that I got from http://www.cs.ru.nl/lab/xenomai/exercises/ex01/Exercise-1.html

I am using the hello world example, and I write it in the file named helloworldRT.c
this is how I make it compiled
[root@domain.hid Desktop]# gcc -c -I /usr/xenomai/include/ helloworldRT.c
<it seems works>
[root@domain.hid Desktop]# gcc -o helloworldrt helloworldRT.o
helloworldRT.o: In function `demo':
helloworldRT.c:(.text+0xe): undefined reference to `rt_printf'
helloworldRT.c:(.text+0x13): undefined reference to `rt_task_self'
helloworldRT.c:(.text+0x28): undefined reference to `rt_task_inquire'
helloworldRT.c:(.text+0x3e): undefined reference to `rt_printf'
helloworldRT.o: In function `main':
helloworldRT.c:(.text+0x55): undefined reference to `rt_print_auto_init'
helloworldRT.c:(.text+0x6d): undefined reference to `rt_printf'
helloworldRT.c:(.text+0xb6): undefined reference to `rt_task_create'
helloworldRT.c:(.text+0xd2): undefined reference to `rt_task_start'
collect2: ld returned 1 exit status
<this is the error I got>

can somebody tell me how to compile it well? it seems I miss something in the way I compile. Can somebody tell me the right command?

Thanks




      

[-- Attachment #2: Type: text/html, Size: 1534 bytes --]

             reply	other threads:[~2011-02-22 19:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-22 19:18 Ramon Rusli [this message]
2011-02-22 19:31 ` [Xenomai-help] [ask] error undefined reference while trying to compile Gilles Chanteperdrix
     [not found] <497156.82404.qm@domain.hid>
2011-02-22 19:36 ` Gilles Chanteperdrix

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=753266.83805.qm@domain.hid \
    --to=mon_nie@domain.hid \
    --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.