multiple definition of...

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Nov 16 10:32:25 UTC 2012


On 11/16/2012 10:11 AM, Luca Cinquepalmi wrote:
> Hi all,
> I'm trying to compile an RTEMS application with two source file: a init.c and a
> task.c. I also have a system.h as indicated in RTEMS examples. If I use
> *#include "system.h"* in all two C files, when I compile the application, a lot
> of errors appear,  all of type: *multiple definition of
> `rtems_libio_init_helper'*, ...
> All rtems examples are done in this way... how can I solve it? Thanks a lot!
>
>      Luca
>
> PS: If I compile the application whit a unique file it perfectly works...

System configuration in RTEMS is performed by <rtems/confdefs.h> which uses 
various application defined pre-processor defines.  The actual configuration 
structures are defined if CONFIGURE_INIT is defined before the include of 
<rtems/confdefs.h>.  You must define CONFIGURE_INIT and inlude 
<rtems/confdefs.h> at most once.

-- 
Sebastian Huber, embedded brains GmbH

Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone   : +49 89 18 90 80 79-6
Fax     : +49 89 18 90 80 79-9
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.





More information about the users mailing list