All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] undefined reference to `rt_printf(char const*, ...)'
@ 2007-12-05  5:43 Dennis Nguyen
  2007-12-05 10:09 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 3+ messages in thread
From: Dennis Nguyen @ 2007-12-05  5:43 UTC (permalink / raw)
  To: xenomai

Hello all,

I got the "undefined reference to rt_printf" function when I called 
rt_printf in my application.  I included the header #include <rtdk.h> in 
the source file and -L /usr/xenomai/lib -lrtdk -lpthread-rt in the 
makefile.  I'm using kernel i386 2.6.23.9 and xenomai 2-4rc7. I have the 
rtdk.h include file in /usr/xenomai/include and librtdk.so in the 
/usr/xenomai/lib.
What am I missing?

Thanks in advance


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xenomai-help] undefined reference to `rt_printf(char const*, ...)'
  2007-12-05  5:43 [Xenomai-help] undefined reference to `rt_printf(char const*, ...)' Dennis Nguyen
@ 2007-12-05 10:09 ` Gilles Chanteperdrix
  2007-12-05 17:44   ` Dennis Nguyen
  0 siblings, 1 reply; 3+ messages in thread
From: Gilles Chanteperdrix @ 2007-12-05 10:09 UTC (permalink / raw)
  To: Dennis Nguyen; +Cc: xenomai

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

On Dec 5, 2007 6:43 AM, Dennis Nguyen <dennisnguy@domain.hid> wrote:
> Hello all,
>
> I got the "undefined reference to rt_printf" function when I called
> rt_printf in my application.  I included the header #include <rtdk.h> in
> the source file and -L /usr/xenomai/lib -lrtdk -lpthread-rt in the
> makefile.  I'm using kernel i386 2.6.23.9 and xenomai 2-4rc7. I have the
> rtdk.h include file in /usr/xenomai/include and librtdk.so in the
> /usr/xenomai/lib.
> What am I missing?

Does the attached patch help ?

-- 
                                               Gilles Chanteperdrix

[-- Attachment #2: xeno-extern-c-rtdk.diff --]
[-- Type: application/octet-stream, Size: 662 bytes --]

Index: include/rtdk.h
===================================================================
--- include/rtdk.h	(révision 3237)
+++ include/rtdk.h	(copie de travail)
@@ -44,6 +44,10 @@
 #include <stdio.h>
 #include <stdarg.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
 int rt_vfprintf(FILE *stream, const char *format, va_list args);
 int rt_vprintf(const char *format, va_list args);
 int rt_fprintf(FILE *stream, const char *format, ...);
@@ -54,6 +58,10 @@
 void rt_print_auto_init(int enable);
 const char *rt_print_buffer_name(void);
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
 #endif /* !KERNEL */
 
 #endif /* !_RTUTILS_H */

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xenomai-help] undefined reference to `rt_printf(char const*, ...)'
  2007-12-05 10:09 ` Gilles Chanteperdrix
@ 2007-12-05 17:44   ` Dennis Nguyen
  0 siblings, 0 replies; 3+ messages in thread
From: Dennis Nguyen @ 2007-12-05 17:44 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

On Wed, 2007-12-05 at 11:09 +0100, Gilles Chanteperdrix wrote:
> On Dec 5, 2007 6:43 AM, Dennis Nguyen <dennisnguy@domain.hid> wrote:
> > Hello all,
> >
> > I got the "undefined reference to rt_printf" function when I called
> > rt_printf in my application.  I included the header #include <rtdk.h> in
> > the source file and -L /usr/xenomai/lib -lrtdk -lpthread-rt in the
> > makefile.  I'm using kernel i386 2.6.23.9 and xenomai 2-4rc7. I have the
> > rtdk.h include file in /usr/xenomai/include and librtdk.so in the
> > /usr/xenomai/lib.
> > What am I missing?
> 
> Does the attached patch help ?
> 
Thanks Gilles,
Yes, the patch helped. My application is a cpp file.
Dennis



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-12-05 17:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-05  5:43 [Xenomai-help] undefined reference to `rt_printf(char const*, ...)' Dennis Nguyen
2007-12-05 10:09 ` Gilles Chanteperdrix
2007-12-05 17:44   ` Dennis Nguyen

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.